Documentation ¶
Index ¶
- Constants
- func NewDefaultConfig() *pbtypes.FrontgateConfig
- func NewDefaultConfigString() string
- func Serve(cfg *ConfigManager)
- func ServeReverseRpcServerForPilot(cfg *pbtypes.FrontgateConfig, service pbfrontgate.FrontgateService)
- func WithFrontgateId(id string) func(opt *pbtypes.FrontgateConfig)
- func WithFrontgateNodeList(node ...*pbtypes.FrontgateEndpoint) func(opt *pbtypes.FrontgateConfig)
- func WithListenPort(port int) func(opt *pbtypes.FrontgateConfig)
- func WithPilotService(host string, port int) func(opt *pbtypes.FrontgateConfig)
- type ConfigManager
- type EtcdClient
- func (p *EtcdClient) Clear() error
- func (p *EtcdClient) Close() error
- func (p *EtcdClient) DelValues(keys ...string) error
- func (p *EtcdClient) DelValuesWithPrefix(keyPrefixs ...string) error
- func (p *EtcdClient) DeregisterCmd(in *pbtypes.SubTask_DeregisterCmd) error
- func (p *EtcdClient) DeregisterMetadata(in *pbtypes.SubTask_DeregisterMetadata) error
- func (p *EtcdClient) Get(key string) (val string, ok bool)
- func (p *EtcdClient) GetAllValues() (map[string]string, error)
- func (p *EtcdClient) GetStructValue(keyPrefix string, out interface{}) error
- func (p *EtcdClient) GetValues(keys ...string) (map[string]string, error)
- func (p *EtcdClient) GetValuesByPrefix(keyPrefix string) (map[string]string, error)
- func (p *EtcdClient) RegisterCmd(in *pbtypes.SubTask_RegisterCmd) error
- func (p *EtcdClient) RegisterMetadata(in *pbtypes.SubTask_RegisterMetadata) error
- func (p *EtcdClient) Set(key, val string) error
- func (p *EtcdClient) SetStructValue(keyPrefix string, val interface{}) error
- func (p *EtcdClient) SetValues(m map[string]string) error
- type EtcdClientManager
- type Options
- type Server
- func (p *Server) ClosePilotChannel(in *pbtypes.Empty, out *pbtypes.Empty) error
- func (p *Server) DeregisterCmd(in *pbtypes.SubTask_DeregisterCmd, out *pbtypes.Empty) error
- func (p *Server) DeregisterMetadata(in *pbtypes.SubTask_DeregisterMetadata, out *pbtypes.Empty) error
- func (p *Server) GetConfdConfig(in *pbtypes.ConfdEndpoint, out *pbtypes.ConfdConfig) error
- func (p *Server) GetDroneConfig(in *pbtypes.DroneEndpoint, out *pbtypes.DroneConfig) error
- func (p *Server) GetDroneList(in *pbtypes.Empty, out *pbtypes.DroneIdList) error
- func (p *Server) GetEtcdValues(in *pbtypes.StringList, out *pbtypes.StringMap) error
- func (p *Server) GetEtcdValuesByPrefix(in *pbtypes.String, out *pbtypes.StringMap) error
- func (p *Server) GetFrontgateConfig(in *pbtypes.Empty, out *pbtypes.FrontgateConfig) error
- func (p *Server) GetPilotConfig(in *pbtypes.Empty, out *pbtypes.PilotConfig) error
- func (p *Server) HeartBeat(in *pbtypes.Empty, out *pbtypes.Empty) error
- func (p *Server) IsConfdRunning(in *pbtypes.ConfdEndpoint, out *pbtypes.Bool) error
- func (p *Server) PingDrone(in *pbtypes.DroneEndpoint, out *pbtypes.Empty) error
- func (p *Server) PingFrontgate(in *pbtypes.Empty, out *pbtypes.Empty) error
- func (p *Server) PingFrontgateNode(in *pbtypes.Empty, out *pbtypes.Empty) error
- func (p *Server) PingPilot(in *pbtypes.Empty, out *pbtypes.Empty) error
- func (p *Server) RegisterCmd(in *pbtypes.SubTask_RegisterCmd, out *pbtypes.Empty) error
- func (p *Server) RegisterMetadata(in *pbtypes.SubTask_RegisterMetadata, out *pbtypes.Empty) error
- func (p *Server) ReportSubTaskStatus(in *pbtypes.SubTaskStatus, out *pbtypes.Empty) error
- func (p *Server) RunCommand(arg *pbtypes.RunCommandOnFrontgateRequest, out *pbtypes.String) error
- func (p *Server) RunCommandOnDrone(in *pbtypes.RunCommandOnDroneRequest, out *pbtypes.String) error
- func (p *Server) SetDroneConfig(in *pbtypes.SetDroneConfigRequest, out *pbtypes.Empty) error
- func (p *Server) SetEtcdValues(in *pbtypes.StringMap, out *pbtypes.Empty) error
- func (p *Server) SetFrontgateConfig(cfg *pbtypes.FrontgateConfig, out *pbtypes.Empty) error
- func (p *Server) SetFrontgateNodeConfig(cfg *pbtypes.FrontgateConfig, out *pbtypes.Empty) error
- func (p *Server) StartConfd(in *pbtypes.ConfdEndpoint, out *pbtypes.Empty) error
- func (p *Server) StopConfd(in *pbtypes.ConfdEndpoint, out *pbtypes.Empty) error
Constants ¶
View Source
const DefaultEtcdMaxOpsPerTxn = 128
Variables ¶
This section is empty.
Functions ¶
func NewDefaultConfig ¶
func NewDefaultConfig() *pbtypes.FrontgateConfig
func NewDefaultConfigString ¶
func NewDefaultConfigString() string
func Serve ¶
func Serve(cfg *ConfigManager)
func ServeReverseRpcServerForPilot ¶
func ServeReverseRpcServerForPilot( cfg *pbtypes.FrontgateConfig, service pbfrontgate.FrontgateService, )
func WithFrontgateId ¶
func WithFrontgateId(id string) func(opt *pbtypes.FrontgateConfig)
func WithFrontgateNodeList ¶
func WithFrontgateNodeList(node ...*pbtypes.FrontgateEndpoint) func(opt *pbtypes.FrontgateConfig)
func WithListenPort ¶
func WithListenPort(port int) func(opt *pbtypes.FrontgateConfig)
func WithPilotService ¶
Types ¶
type ConfigManager ¶
type ConfigManager struct {
// contains filtered or unexported fields
}
func NewConfigManager ¶
func NewConfigManager(path string, cfg *pbtypes.FrontgateConfig, opts ...Options) *ConfigManager
func (*ConfigManager) Get ¶
func (p *ConfigManager) Get() (cfg *pbtypes.FrontgateConfig)
func (*ConfigManager) Save ¶
func (p *ConfigManager) Save() error
func (*ConfigManager) Set ¶
func (p *ConfigManager) Set(cfg *pbtypes.FrontgateConfig) error
type EtcdClient ¶
func NewEtcdClient ¶
func NewEtcdClientWithConfig ¶
func NewEtcdClientWithConfig(cfg clientv3.Config, maxTxnOps int) (*EtcdClient, error)
func (*EtcdClient) Clear ¶
func (p *EtcdClient) Clear() error
func (*EtcdClient) Close ¶
func (p *EtcdClient) Close() error
func (*EtcdClient) DelValues ¶
func (p *EtcdClient) DelValues(keys ...string) error
func (*EtcdClient) DelValuesWithPrefix ¶
func (p *EtcdClient) DelValuesWithPrefix(keyPrefixs ...string) error
func (*EtcdClient) DeregisterCmd ¶
func (p *EtcdClient) DeregisterCmd(in *pbtypes.SubTask_DeregisterCmd) error
func (*EtcdClient) DeregisterMetadata ¶
func (p *EtcdClient) DeregisterMetadata(in *pbtypes.SubTask_DeregisterMetadata) error
func (*EtcdClient) GetAllValues ¶
func (p *EtcdClient) GetAllValues() (map[string]string, error)
func (*EtcdClient) GetStructValue ¶
func (p *EtcdClient) GetStructValue(keyPrefix string, out interface{}) error
func (*EtcdClient) GetValues ¶
func (p *EtcdClient) GetValues(keys ...string) (map[string]string, error)
func (*EtcdClient) GetValuesByPrefix ¶
func (p *EtcdClient) GetValuesByPrefix(keyPrefix string) (map[string]string, error)
func (*EtcdClient) RegisterCmd ¶
func (p *EtcdClient) RegisterCmd(in *pbtypes.SubTask_RegisterCmd) error
func (*EtcdClient) RegisterMetadata ¶
func (p *EtcdClient) RegisterMetadata(in *pbtypes.SubTask_RegisterMetadata) error
func (*EtcdClient) Set ¶
func (p *EtcdClient) Set(key, val string) error
func (*EtcdClient) SetStructValue ¶
func (p *EtcdClient) SetStructValue(keyPrefix string, val interface{}) error
type EtcdClientManager ¶
type EtcdClientManager struct {
// contains filtered or unexported fields
}
func NewEtcdClientManager ¶
func NewEtcdClientManager() *EtcdClientManager
func (*EtcdClientManager) Clear ¶
func (p *EtcdClientManager) Clear()
func (*EtcdClientManager) ClearClient ¶
func (p *EtcdClientManager) ClearClient(client *EtcdClient)
func (*EtcdClientManager) Get ¶
func (p *EtcdClientManager) Get() (*EtcdClient, error)
func (*EtcdClientManager) GetClient ¶
func (p *EtcdClientManager) GetClient(endpoints []string, timeout time.Duration, maxTxnOps int) (*EtcdClient, error)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) ClosePilotChannel ¶
func (*Server) DeregisterCmd ¶
func (*Server) DeregisterMetadata ¶
func (*Server) GetConfdConfig ¶
func (*Server) GetDroneConfig ¶
func (*Server) GetDroneList ¶
func (*Server) GetEtcdValues ¶
func (*Server) GetEtcdValuesByPrefix ¶
func (*Server) GetFrontgateConfig ¶
func (*Server) GetPilotConfig ¶
func (*Server) IsConfdRunning ¶
func (*Server) PingFrontgate ¶
func (*Server) PingFrontgateNode ¶
func (*Server) RegisterCmd ¶
func (*Server) RegisterMetadata ¶
func (*Server) ReportSubTaskStatus ¶
func (*Server) RunCommand ¶
func (*Server) RunCommandOnDrone ¶
func (*Server) SetDroneConfig ¶
func (*Server) SetEtcdValues ¶
func (*Server) SetFrontgateConfig ¶
func (*Server) SetFrontgateNodeConfig ¶
func (*Server) StartConfd ¶
Click to show internal directories.
Click to hide internal directories.