Documentation ¶
Index ¶
- Variables
- func NewDefaultConfig() *pbtypes.DroneConfig
- func NewDefaultConfigString() string
- func Serve(cfg *ConfigManager, confd *ConfdServer)
- func WithCmdInfoLogPath(path string) func(opt *pbtypes.DroneConfig)
- func WithDrondId(id string) func(opt *pbtypes.DroneConfig)
- func WithListenPort(port int) func(opt *pbtypes.DroneConfig)
- type CmdStatus
- type ConfdServer
- func (p *ConfdServer) Err() error
- func (p *ConfdServer) GetBackendClient() libconfd.BackendClient
- func (p *ConfdServer) GetConfig() *pbtypes.ConfdConfig
- func (p *ConfdServer) IsRunning() bool
- func (p *ConfdServer) Save() error
- func (p *ConfdServer) SetConfig(cfg *pbtypes.ConfdConfig, fnHookKeyAdjuster func(key string) (realKey string)) error
- func (p *ConfdServer) Start(opts ...libconfd.Options) error
- func (p *ConfdServer) Stop() error
- type ConfigManager
- type FrontgateController
- type Options
- type Server
- func (p *Server) DistributeDrone(ctx context.Context, req *pbtypes.DistributeDroneRequest) (*pbtypes.Empty, error)
- func (p *Server) GetConfdConfig(ctx context.Context, arg *pbtypes.Empty) (*pbtypes.ConfdConfig, error)
- func (p *Server) GetDroneConfig(context.Context, *pbtypes.Empty) (*pbtypes.DroneConfig, error)
- func (p *Server) GetDroneVersion(context.Context, *pbtypes.DroneEndpoint) (*pbtypes.Version, error)
- func (p *Server) GetFrontgateConfig(context.Context, *pbtypes.Empty) (*pbtypes.FrontgateConfig, error)
- func (p *Server) GetFrontgateVersion(context.Context, *pbtypes.Empty) (*pbtypes.Version, error)
- func (p *Server) GetPilotVersion(context.Context, *pbtypes.Empty) (*pbtypes.Version, error)
- func (p *Server) GetTemplateFiles(ctx context.Context, arg *pbtypes.Empty) (*pbtypes.StringList, error)
- func (p *Server) GetValues(ctx context.Context, arg *pbtypes.StringList) (*pbtypes.StringMap, error)
- func (p *Server) IsConfdRunning(ctx context.Context, arg *pbtypes.Empty) (*pbtypes.Bool, error)
- func (p *Server) PingDrone(ctx context.Context, arg *pbtypes.Empty) (*pbtypes.Empty, error)
- func (p *Server) PingFrontgate(ctx context.Context, arg *pbtypes.FrontgateEndpoint) (*pbtypes.Empty, error)
- func (p *Server) PingMetadataBackend(context.Context, *pbtypes.FrontgateEndpoint) (*pbtypes.Empty, error)
- func (p *Server) PingPilot(ctx context.Context, arg *pbtypes.FrontgateEndpoint) (*pbtypes.Empty, error)
- func (p *Server) RunCommand(ctx context.Context, arg *pbtypes.RunCommandOnDroneRequest) (*pbtypes.String, error)
- func (p *Server) SetConfdConfig(ctx context.Context, arg *pbtypes.ConfdConfig) (*pbtypes.Empty, error)
- func (p *Server) SetDroneConfig(ctx context.Context, cfg *pbtypes.DroneConfig) (*pbtypes.Empty, error)
- func (p *Server) SetFrontgateConfig(ctx context.Context, cfg *pbtypes.FrontgateConfig) (*pbtypes.Empty, error)
- func (p *Server) StartConfd(ctx context.Context, arg *pbtypes.Empty) (*pbtypes.Empty, error)
- func (p *Server) StopConfd(ctx context.Context, arg *pbtypes.Empty) (*pbtypes.Empty, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RetryInterval = 3 * time.Second RetryCount = 5 DowloadPathPattern = "/opt/openpitrix/bin/%s" DowloadFilePathPattern = "/opt/openpitrix/bin/%s/%s" PilotVersionFilePath = "/opt/openpitrix/conf/pilot-version" )
Functions ¶
func NewDefaultConfig ¶
func NewDefaultConfig() *pbtypes.DroneConfig
func NewDefaultConfigString ¶
func NewDefaultConfigString() string
func Serve ¶
func Serve(cfg *ConfigManager, confd *ConfdServer)
func WithCmdInfoLogPath ¶
func WithCmdInfoLogPath(path string) func(opt *pbtypes.DroneConfig)
func WithDrondId ¶
func WithDrondId(id string) func(opt *pbtypes.DroneConfig)
func WithListenPort ¶
func WithListenPort(port int) func(opt *pbtypes.DroneConfig)
Types ¶
type CmdStatus ¶
type ConfdServer ¶
type ConfdServer struct {
// contains filtered or unexported fields
}
func NewConfdServer ¶
func NewConfdServer(cfgpath string) *ConfdServer
func (*ConfdServer) Err ¶
func (p *ConfdServer) Err() error
func (*ConfdServer) GetBackendClient ¶
func (p *ConfdServer) GetBackendClient() libconfd.BackendClient
func (*ConfdServer) GetConfig ¶
func (p *ConfdServer) GetConfig() *pbtypes.ConfdConfig
func (*ConfdServer) IsRunning ¶
func (p *ConfdServer) IsRunning() bool
func (*ConfdServer) Save ¶
func (p *ConfdServer) Save() error
func (*ConfdServer) SetConfig ¶
func (p *ConfdServer) SetConfig(cfg *pbtypes.ConfdConfig, fnHookKeyAdjuster func(key string) (realKey string)) error
func (*ConfdServer) Stop ¶
func (p *ConfdServer) Stop() error
type ConfigManager ¶
type ConfigManager struct {
// contains filtered or unexported fields
}
func NewConfigManager ¶
func NewConfigManager(path string, cfg *pbtypes.DroneConfig, opts ...Options) *ConfigManager
func (*ConfigManager) Get ¶
func (p *ConfigManager) Get() (cfg *pbtypes.DroneConfig)
func (*ConfigManager) Save ¶
func (p *ConfigManager) Save() error
func (*ConfigManager) Set ¶
func (p *ConfigManager) Set(cfg *pbtypes.DroneConfig) error
type FrontgateController ¶
type FrontgateController struct {
// contains filtered or unexported fields
}
func NewFrontgateController ¶
func NewFrontgateController() *FrontgateController
func (*FrontgateController) GetConfig ¶
func (p *FrontgateController) GetConfig() (*pbtypes.FrontgateConfig, error)
func (*FrontgateController) ReportSubTaskStatus ¶
func (p *FrontgateController) ReportSubTaskStatus(in *pbtypes.SubTaskStatus) error
func (*FrontgateController) SetConfig ¶
func (p *FrontgateController) SetConfig(cfg *pbtypes.FrontgateConfig) error
type Options ¶
type Options func(opt *pbtypes.DroneConfig)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(cfg *ConfigManager, confd *ConfdServer) *Server
func (*Server) DistributeDrone ¶ added in v0.2.3
func (*Server) GetConfdConfig ¶
func (*Server) GetDroneConfig ¶
func (*Server) GetDroneVersion ¶ added in v0.2.1
func (*Server) GetFrontgateConfig ¶
func (*Server) GetFrontgateVersion ¶ added in v0.2.1
func (*Server) GetPilotVersion ¶ added in v0.2.1
func (*Server) GetTemplateFiles ¶
func (*Server) IsConfdRunning ¶
func (*Server) PingFrontgate ¶
func (*Server) PingMetadataBackend ¶ added in v0.2.1
func (*Server) RunCommand ¶
func (*Server) SetConfdConfig ¶
func (*Server) SetDroneConfig ¶
func (*Server) SetFrontgateConfig ¶
func (*Server) StartConfd ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.