package session
import "github.com/moby/buildkit/session"
Index ¶
- func FromContext(ctx context.Context) string
- func MethodURL(s, m string) string
- func NewContext(ctx context.Context, id string) context.Context
- type Attachable
- type Caller
- type Dialer
- type Manager
- func NewManager() (*Manager, error)
- func (sm *Manager) Get(ctx context.Context, id string) (Caller, error)
- func (sm *Manager) HandleConn(ctx context.Context, conn net.Conn, opts map[string][]string) error
- func (sm *Manager) HandleHTTPRequest(ctx context.Context, w http.ResponseWriter, r *http.Request) error
- type Session
Functions ¶
func FromContext ¶
func MethodURL ¶
MethodURL returns a gRPC method URL for service and method name
func NewContext ¶
Types ¶
type Attachable ¶
Attachable defines a feature that can be exposed on a session
type Caller ¶
type Caller interface { Context() context.Context Supports(method string) bool Conn() *grpc.ClientConn Name() string () string }
Caller can invoke requests on the session
type Dialer ¶
Dialer returns a connection that can be used by the session
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is a controller for accessing currently active sessions
func NewManager ¶
NewManager returns a new Manager
func (*Manager) Get ¶
Get returns a session by ID
func (*Manager) HandleConn ¶
HandleConn handles an incoming raw connection
func (*Manager) HandleHTTPRequest ¶
func (sm *Manager) HandleHTTPRequest(ctx context.Context, w http.ResponseWriter, r *http.Request) error
HandleHTTPRequest handles an incoming HTTP request
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session is a long running connection between client and a daemon
func NewSession ¶
NewSession returns a new long running session
func (*Session) Allow ¶
func (s *Session) Allow(a Attachable)
Allow enables a given service to be reachable through the grpc session
func (*Session) Close ¶
Close closes the session
func (*Session) ID ¶
ID returns unique identifier for the session
func (*Session) Run ¶
Run activates the session
Source Files ¶
context.go grpc.go manager.go session.go
Directories ¶
- Version
- v0.6.4
- Published
- Feb 21, 2020
- Platform
- js/wasm
- Imports
- 16 packages
- Last checked
- 6 hours ago –
Tools for package owners.