pilot

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultConfig

func NewDefaultConfig() *pbtypes.PilotConfig

func NewDefaultConfigString

func NewDefaultConfigString() string

func Serve

func Serve(cfg *pbtypes.PilotConfig, pbTlsCfg *pbtypes.PilotTLSConfig, opts ...Options)

func WithForFgListenPort added in v0.2.0

func WithForFgListenPort(port int) func(opt *pbtypes.PilotConfig)

func WithListenPort

func WithListenPort(port int) func(opt *pbtypes.PilotConfig)

func WithPilotId

func WithPilotId(id string) func(opt *pbtypes.PilotConfig)

Types

type FrontgateClient

type FrontgateClient struct {
	*pbfrontgate.FrontgateServiceClient
	// contains filtered or unexported fields
}

type FrontgateClientManager

type FrontgateClientManager struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewFrontgateClientManager

func NewFrontgateClientManager() *FrontgateClientManager

func (*FrontgateClientManager) CheckAllClient

func (p *FrontgateClientManager) CheckAllClient()

func (*FrontgateClientManager) CloseClient

func (p *FrontgateClientManager) CloseClient(id, nodeId string)

func (*FrontgateClientManager) GetClient

func (p *FrontgateClientManager) GetClient(id string) (*FrontgateClient, error)

func (*FrontgateClientManager) GetNodeClient

func (p *FrontgateClientManager) GetNodeClient(id, nodeId string) (*FrontgateClient, error)

func (*FrontgateClientManager) IsFrontgateShutdownError

func (_ *FrontgateClientManager) IsFrontgateShutdownError(err error) bool

func (*FrontgateClientManager) PutClient

func (p *FrontgateClientManager) PutClient(c *pbfrontgate.FrontgateServiceClient, info *pbtypes.FrontgateConfig) (closed chan bool)

type Options

type Options func(opt *pbtypes.PilotConfig)

type Server

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

func (*Server) DeregisterCmd

func (p *Server) DeregisterCmd(ctx context.Context, arg *pbtypes.SubTask_DeregisterCmd) (*pbtypes.Empty, error)

func (*Server) DeregisterMetadata

func (p *Server) DeregisterMetadata(ctx context.Context, arg *pbtypes.SubTask_DeregisterMetadata) (*pbtypes.Empty, error)

func (*Server) DeregisterMetadataMapping added in v0.4.0

func (p *Server) DeregisterMetadataMapping(ctx context.Context, arg *pbtypes.SubTask_DeregisterMetadata) (*pbtypes.Empty, error)

func (*Server) FrontgateChannel

func (p *Server) FrontgateChannel(ch pbpilot.PilotServiceForFrontgate_FrontgateChannelServer) error

func (*Server) GetConfdConfig

func (p *Server) GetConfdConfig(ctx context.Context, arg *pbtypes.ConfdEndpoint) (*pbtypes.ConfdConfig, error)

func (*Server) GetDroneConfig

func (p *Server) GetDroneConfig(ctx context.Context, arg *pbtypes.DroneEndpoint) (*pbtypes.DroneConfig, error)

func (*Server) GetDroneVersion added in v0.2.1

func (p *Server) GetDroneVersion(context.Context, *pbtypes.DroneEndpoint) (*pbtypes.Version, error)

func (*Server) GetFrontgateConfig

func (p *Server) GetFrontgateConfig(ctx context.Context, arg *pbtypes.FrontgateId) (*pbtypes.FrontgateConfig, error)

func (*Server) GetFrontgateList

func (p *Server) GetFrontgateList(context.Context, *pbtypes.Empty) (*pbtypes.FrontgateIdList, error)

func (*Server) GetFrontgateVersion added in v0.2.1

func (p *Server) GetFrontgateVersion(context.Context, *pbtypes.FrontgateId) (*pbtypes.Version, error)

func (*Server) GetPilotClientTLSConfig added in v0.2.0

func (p *Server) GetPilotClientTLSConfig(context.Context, *pbtypes.Empty) (*pbtypes.PilotClientTLSConfig, error)

func (*Server) GetPilotConfig

func (p *Server) GetPilotConfig(context.Context, *pbtypes.Empty) (*pbtypes.PilotConfig, error)

func (*Server) GetPilotVersion added in v0.2.1

func (p *Server) GetPilotVersion(context.Context, *pbtypes.Empty) (*pbtypes.Version, error)

func (*Server) GetSubtaskStatus

func (p *Server) GetSubtaskStatus(ctx context.Context, arg *pbtypes.SubTaskId) (*pbtypes.SubTaskStatus, error)

func (*Server) HandleSubtask

func (p *Server) HandleSubtask(ctx context.Context, msg *pbtypes.SubTaskMessage) (*pbtypes.Empty, error)

func (*Server) IsConfdRunning

func (p *Server) IsConfdRunning(ctx context.Context, arg *pbtypes.DroneEndpoint) (*pbtypes.Bool, error)

func (*Server) PingDrone

func (p *Server) PingDrone(ctx context.Context, arg *pbtypes.DroneEndpoint) (*pbtypes.Empty, error)

func (*Server) PingFrontgate

func (p *Server) PingFrontgate(ctx context.Context, arg *pbtypes.FrontgateId) (*pbtypes.Empty, error)

func (*Server) PingFrontgateNode

func (p *Server) PingFrontgateNode(ctx context.Context, arg *pbtypes.FrontgateNodeId) (*pbtypes.Empty, error)

func (*Server) PingMetadataBackend added in v0.2.1

func (p *Server) PingMetadataBackend(ctx context.Context, arg *pbtypes.FrontgateId) (*pbtypes.Empty, error)

func (*Server) PingPilot

func (p *Server) PingPilot(ctx context.Context, arg *pbtypes.Empty) (*pbtypes.Empty, error)

func (*Server) RegisterCmd

func (p *Server) RegisterCmd(ctx context.Context, arg *pbtypes.SubTask_RegisterCmd) (*pbtypes.Empty, error)

func (*Server) RegisterMetadata

func (p *Server) RegisterMetadata(ctx context.Context, arg *pbtypes.SubTask_RegisterMetadata) (*pbtypes.Empty, error)

func (*Server) RegisterMetadataMapping added in v0.4.0

func (p *Server) RegisterMetadataMapping(ctx context.Context, arg *pbtypes.SubTask_RegisterMetadata) (*pbtypes.Empty, error)

func (*Server) ReportSubTaskStatus

func (p *Server) ReportSubTaskStatus(ctx context.Context, arg *pbtypes.SubTaskStatus) (*pbtypes.Empty, error)

func (*Server) RunCommandOnDrone

func (p *Server) RunCommandOnDrone(ctx context.Context, arg *pbtypes.RunCommandOnDroneRequest) (*pbtypes.String, error)

func (*Server) RunCommandOnFrontgateNode

func (p *Server) RunCommandOnFrontgateNode(ctx context.Context, arg *pbtypes.RunCommandOnFrontgateRequest) (*pbtypes.String, error)

func (*Server) SetDroneConfig

func (p *Server) SetDroneConfig(ctx context.Context, arg *pbtypes.SetDroneConfigRequest) (*pbtypes.Empty, error)

func (*Server) SetFrontgateConfig

func (p *Server) SetFrontgateConfig(ctx context.Context, arg *pbtypes.FrontgateConfig) (*pbtypes.Empty, error)

func (*Server) StartConfd

func (p *Server) StartConfd(ctx context.Context, arg *pbtypes.DroneEndpoint) (*pbtypes.Empty, error)

func (*Server) StopConfd

func (p *Server) StopConfd(ctx context.Context, arg *pbtypes.DroneEndpoint) (*pbtypes.Empty, error)

type TaskStatusManager

type TaskStatusManager struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewTaskStatusManager

func NewTaskStatusManager() *TaskStatusManager

func (*TaskStatusManager) GetStatus

func (p *TaskStatusManager) GetStatus(id string) (v pbtypes.SubTaskStatus, ok bool)

func (*TaskStatusManager) PutStatus

func (p *TaskStatusManager) PutStatus(v pbtypes.SubTaskStatus)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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