Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidConnection define the invalide connection ErrInvalidConnection = errors.New("invalid connection") // ErrNoCredentials define no creds ErrNoCredentials = errors.New("no credentials available") )
Functions ¶
This section is empty.
Types ¶
type CredInfo ¶
CredInfo returned by grpc Credential that the workload API can use.
func CallerFromAuthInfo ¶
func CallerFromAuthInfo(ainfo credentials.AuthInfo) (CredInfo, bool)
CallerFromAuthInfo return the auth info
func CallerFromContext ¶
CallerFromContext return the caller info
type Options ¶
type Options struct { // PathPrefix is the uds path prefix for each workload service. PathPrefix string // Sockfile is the the uds file name for each workload service. SockFile string // RegAPI is the callback to invoke to connect the gRPC Server. RegAPI RegisterGrpcServer }
Options contains the configuration for the workload service.
type RegisterGrpcServer ¶
RegisterGrpcServer is used by WorkloadAPI to register itself as the grpc server. It is invoked by the workload handler when it is initializing the workload socket.
type WorkloadHandler ¶
type WorkloadHandler interface { Serve() Stop() WaitDone() }
WorkloadHandler support this given interface. nodeagentmgmt invokes: - Serve() as a go routine when a Workload is added. - Stop() when a Workload is deleted. - WaitDone() to wait for a response back from Workloadhandler
func NewHandler ¶
func NewHandler(wli *pbmgmt.WorkloadInfo, options Options) WorkloadHandler
NewHandler returns the new server with default setup.
Click to show internal directories.
Click to hide internal directories.