frontgate

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2018 License: Apache-2.0 Imports: 28 Imported by: 1

Documentation

Index

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

func WithPilotService(host string, port int) func(opt *pbtypes.FrontgateConfig)

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

type EtcdClient struct {
	*clientv3.Client
	// contains filtered or unexported fields
}

func NewEtcdClient

func NewEtcdClient(endpoints []string, timeout time.Duration, maxTxnOps int) (*EtcdClient, error)

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) Get

func (p *EtcdClient) Get(key string) (val string, ok bool)

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

func (*EtcdClient) SetValues

func (p *EtcdClient) SetValues(m map[string]string) 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 Options

type Options func(opt *pbtypes.FrontgateConfig)

type Server

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

func (*Server) ClosePilotChannel

func (p *Server) ClosePilotChannel(in *pbtypes.Empty, out *pbtypes.Empty) error

func (*Server) DeregisterCmd

func (p *Server) DeregisterCmd(in *pbtypes.SubTask_DeregisterCmd, out *pbtypes.Empty) error

func (*Server) DeregisterMetadata

func (p *Server) DeregisterMetadata(in *pbtypes.SubTask_DeregisterMetadata, out *pbtypes.Empty) error

func (*Server) GetConfdConfig

func (p *Server) GetConfdConfig(in *pbtypes.ConfdEndpoint, out *pbtypes.ConfdConfig) error

func (*Server) GetDroneConfig

func (p *Server) GetDroneConfig(in *pbtypes.DroneEndpoint, out *pbtypes.DroneConfig) error

func (*Server) GetDroneList

func (p *Server) GetDroneList(in *pbtypes.Empty, out *pbtypes.DroneIdList) error

func (*Server) GetEtcdValues

func (p *Server) GetEtcdValues(in *pbtypes.StringList, out *pbtypes.StringMap) error

func (*Server) GetEtcdValuesByPrefix

func (p *Server) GetEtcdValuesByPrefix(in *pbtypes.String, out *pbtypes.StringMap) error

func (*Server) GetFrontgateConfig

func (p *Server) GetFrontgateConfig(in *pbtypes.Empty, out *pbtypes.FrontgateConfig) error

func (*Server) GetPilotConfig

func (p *Server) GetPilotConfig(in *pbtypes.Empty, out *pbtypes.PilotConfig) error

func (*Server) HeartBeat

func (p *Server) HeartBeat(in *pbtypes.Empty, out *pbtypes.Empty) error

func (*Server) IsConfdRunning

func (p *Server) IsConfdRunning(in *pbtypes.ConfdEndpoint, out *pbtypes.Bool) error

func (*Server) PingDrone

func (p *Server) PingDrone(in *pbtypes.DroneEndpoint, out *pbtypes.Empty) error

func (*Server) PingFrontgate

func (p *Server) PingFrontgate(in *pbtypes.Empty, out *pbtypes.Empty) error

func (*Server) PingFrontgateNode

func (p *Server) PingFrontgateNode(in *pbtypes.Empty, out *pbtypes.Empty) error

func (*Server) PingPilot

func (p *Server) PingPilot(in *pbtypes.Empty, out *pbtypes.Empty) error

func (*Server) RegisterCmd

func (p *Server) RegisterCmd(in *pbtypes.SubTask_RegisterCmd, out *pbtypes.Empty) error

func (*Server) RegisterMetadata

func (p *Server) RegisterMetadata(in *pbtypes.SubTask_RegisterMetadata, out *pbtypes.Empty) error

func (*Server) ReportSubTaskStatus

func (p *Server) ReportSubTaskStatus(in *pbtypes.SubTaskStatus, out *pbtypes.Empty) error

func (*Server) RunCommand

func (p *Server) RunCommand(arg *pbtypes.RunCommandOnFrontgateRequest, out *pbtypes.String) error

func (*Server) RunCommandOnDrone

func (p *Server) RunCommandOnDrone(in *pbtypes.RunCommandOnDroneRequest, out *pbtypes.String) error

func (*Server) SetDroneConfig

func (p *Server) SetDroneConfig(in *pbtypes.SetDroneConfigRequest, out *pbtypes.Empty) error

func (*Server) SetEtcdValues

func (p *Server) SetEtcdValues(in *pbtypes.StringMap, out *pbtypes.Empty) error

func (*Server) SetFrontgateConfig

func (p *Server) SetFrontgateConfig(cfg *pbtypes.FrontgateConfig, out *pbtypes.Empty) error

func (*Server) SetFrontgateNodeConfig

func (p *Server) SetFrontgateNodeConfig(cfg *pbtypes.FrontgateConfig, out *pbtypes.Empty) error

func (*Server) StartConfd

func (p *Server) StartConfd(in *pbtypes.ConfdEndpoint, out *pbtypes.Empty) error

func (*Server) StopConfd

func (p *Server) StopConfd(in *pbtypes.ConfdEndpoint, out *pbtypes.Empty) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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