management

package
v0.0.0-...-fd0897c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeAgentClient

type NodeAgentClient struct {
	// contains filtered or unexported fields
}

NodeAgentClient specify a UDS client connection

func ClientUds

func ClientUds(path string) *NodeAgentClient

ClientUds create a new client with path

func NewClient

func NewClient(path string) *NodeAgentClient

NewClient is used by the flexvolume driver to interface with the nodeagent grpc server

func (*NodeAgentClient) Close

func (c *NodeAgentClient) Close()

Close terminates the connection.

func (*NodeAgentClient) WorkloadAdded

func (c *NodeAgentClient) WorkloadAdded(ninputs *pb.WorkloadInfo) (*pb.NodeAgentMgmtResponse, error)

WorkloadAdded add the workload.

func (*NodeAgentClient) WorkloadDeleted

func (c *NodeAgentClient) WorkloadDeleted(ninputs *pb.WorkloadInfo) (*pb.NodeAgentMgmtResponse, error)

WorkloadDeleted delete the workload.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server specifies the node agent server. TODO(incfly): adds sync.Mutex to protects the fields, such as `handlerMap`.

func New

func New(cfg *na.Config) (*Server, error)

New creates an NodeAgent server.

func (*Server) CloseAllWlds

func (s *Server) CloseAllWlds()

CloseAllWlds closes the paths.

func (*Server) Serve

func (s *Server) Serve(path string)

Serve opens the UDS channel and starts to serve NodeAgentService on that uds channel.

func (*Server) Stop

func (s *Server) Stop()

Stop terminates the UDS.

func (*Server) WaitDone

func (s *Server) WaitDone()

WaitDone waits for a response back from Workloadhandler

func (*Server) WorkloadAdded

func (s *Server) WorkloadAdded(ctx context.Context, request *pb.WorkloadInfo) (*pb.NodeAgentMgmtResponse, error)

WorkloadAdded defines the server side action when a workload is added.

func (*Server) WorkloadDeleted

func (s *Server) WorkloadDeleted(ctx context.Context, request *pb.WorkloadInfo) (*pb.NodeAgentMgmtResponse, error)

WorkloadDeleted defines the server side action when a workload is deleted.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL