Documentation ¶
Index ¶
- Variables
- func NewServer(wli *pbmgmt.WorkloadInfo, wlS *mwi.WlServer, pathPrefix string) mwi.WorkloadMgmtInterface
- type CredInfo
- type Server
- func (s *Server) ClientHandshake(_ context.Context, _ string, conn net.Conn) (net.Conn, credentials.AuthInfo, error)
- func (s *Server) Clone() credentials.TransportCredentials
- func (s *Server) GetCred() credentials.TransportCredentials
- func (s *Server) Info() credentials.ProtocolInfo
- func (s *Server) OverrideServerName(_ string) error
- func (s *Server) Serve()
- func (s *Server) ServerHandshake(conn net.Conn) (net.Conn, credentials.AuthInfo, error)
- func (s *Server) Stop()
- func (s *Server) WaitDone()
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 ¶
func NewServer ¶
func NewServer(wli *pbmgmt.WorkloadInfo, wlS *mwi.WlServer, pathPrefix string) mwi.WorkloadMgmtInterface
NewServer return the new server with default setup
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 Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the WorkloadHandler (one per workload).
func (*Server) ClientHandshake ¶
func (s *Server) ClientHandshake(_ context.Context, _ string, conn net.Conn) (net.Conn, credentials.AuthInfo, error)
ClientHandshake return the client handshake info
func (*Server) Clone ¶
func (s *Server) Clone() credentials.TransportCredentials
Clone return the clone info
func (*Server) GetCred ¶
func (s *Server) GetCred() credentials.TransportCredentials
GetCred get the cred
func (*Server) OverrideServerName ¶
OverrideServerName override server name
func (*Server) Serve ¶
func (s *Server) Serve()
Serve adherence to nodeagent workload management interface.
func (*Server) ServerHandshake ¶
ServerHandshake return the server handshake info
Click to show internal directories.
Click to hide internal directories.