Documentation
¶
Index ¶
- Constants
- func ApplyDeploymentUpdates(deployReq *client.RequestDeploy, checkResult *DeploymentCheckResult, ...) error
- type CloudDetector
- type CloudDetectorConfig
- type DeployState
- type DeploymentCheckResult
- type HeartbeatService
- type ReregisterCallback
- type Services
- func (s *Services) ApplyCommunityList(cmd *client.Command, bgpReq *client.RequestBgp, ...) *client.CommandResponse
- func (s *Services) ApplyPrefixList(cmd *client.Command, bgpReq *client.RequestBgp, ...) *client.CommandResponse
- func (s *Services) ApplyRouteMap(cmd *client.Command, bgpReq *client.RequestBgp, ...) *client.CommandResponse
- func (s *Services) ClearBgpRoutes(cmd *client.Command, bgpReq *client.RequestBgp, ...) *client.CommandResponse
- func (s *Services) ClientStats(cmd *proto.Command) *proto.CommandResponse
- func (s *Services) DeployService(cmd *client.Command) *client.CommandResponse
- func (s *Services) EnvoyVersionService(cmd *client.Command) *client.CommandResponse
- func (s *Services) FilebeatService(cmd *client.Command) *client.CommandResponse
- func (s *Services) FilebeatServiceAction(cmd *client.Command, action string) *client.CommandResponse
- func (s *Services) FilebeatServiceLogs(cmd *client.Command) *client.CommandResponse
- func (s *Services) FrrService(cmd *client.Command) *client.CommandResponse
- func (s *Services) GeneralLog(cmd *client.Command) *client.CommandResponse
- func (s *Services) GetBgpConfig(cmd *client.Command, manager bgp.BGPManagerInterface) *client.CommandResponse
- func (s *Services) GetBgpNeighbor(cmd *client.Command, bgpReq *client.RequestBgp, ...) *client.CommandResponse
- func (s *Services) GetBgpPolicyConfig(cmd *client.Command, _ *client.RequestBgp, manager bgp.BGPManagerInterface) *client.CommandResponse
- func (s *Services) GetBgpSummary(cmd *client.Command, manager bgp.BGPManagerInterface) *client.CommandResponse
- func (s *Services) GetFilebeatConfig(cmd *client.Command) *client.CommandResponse
- func (s *Services) GetFilebeatStatus(cmd *client.Command) *client.CommandResponse
- func (s *Services) GetRsyslogConfig(cmd *client.Command) *client.CommandResponse
- func (s *Services) GetRsyslogStatus(cmd *client.Command) *client.CommandResponse
- func (s *Services) HandleBgpNeighbor(cmd *client.Command, bgpReq *client.RequestBgp, ...) *client.CommandResponse
- func (s *Services) ListBgpNeighbors(cmd *client.Command, _ *client.RequestBgp, manager bgp.BGPManagerInterface) *client.CommandResponse
- func (s *Services) NetworkService(cmd *client.Command) *client.CommandResponse
- func (s *Services) ProxyEnvoyAdmin(cmd *client.Command) *client.CommandResponse
- func (s *Services) RemoveBgpNeighbor(cmd *client.Command, bgpReq *client.RequestBgp, ...) *client.CommandResponse
- func (s *Services) RemoveCommunityList(cmd *client.Command, bgpReq *client.RequestBgp, ...) *client.CommandResponse
- func (s *Services) RemovePrefixList(cmd *client.Command, bgpReq *client.RequestBgp, ...) *client.CommandResponse
- func (s *Services) RemoveRouteMap(cmd *client.Command, bgpReq *client.RequestBgp, ...) *client.CommandResponse
- func (s *Services) RsyslogService(cmd *client.Command) *client.CommandResponse
- func (s *Services) RsyslogServiceAction(cmd *client.Command, action string) *client.CommandResponse
- func (s *Services) RsyslogServiceLogs(cmd *client.Command) *client.CommandResponse
- func (s *Services) SetBgpConfig(cmd *client.Command, bgpReq *client.RequestBgp, ...) *client.CommandResponse
- func (s *Services) SetGRPCClient(client *elchigrpc.Client)
- func (s *Services) ShowBgpRoutes(cmd *client.Command, manager bgp.BGPManagerInterface) *client.CommandResponse
- func (s *Services) SystemdService(cmd *client.Command) *client.CommandResponse
- func (s *Services) SystemdServiceAction(cmd *client.Command) *client.CommandResponse
- func (s *Services) SystemdServiceLogs(cmd *client.Command) *client.CommandResponse
- func (s *Services) UndeployService(cmd *client.Command) *client.CommandResponse
- func (s *Services) UpdateBootstrapService(cmd *client.Command) *client.CommandResponse
- func (s *Services) UpdateFilebeatConfig(cmd *client.Command) *client.CommandResponse
- func (s *Services) UpdateRsyslogConfig(cmd *client.Command) *client.CommandResponse
- func (s *Services) UpgradeListenerService(cmd *client.Command) *client.CommandResponse
- func (s *Services) WafVersionService(cmd *client.Command) *client.CommandResponse
Constants ¶
const ( HeartbeatInterval = 1 * time.Minute PingTimeout = 10 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func ApplyDeploymentUpdates ¶
func ApplyDeploymentUpdates(deployReq *client.RequestDeploy, checkResult *DeploymentCheckResult, logger *logger.Logger, runner *cmdrunner.CommandsRunner) error
ApplyDeploymentUpdates applies only the changed components
Types ¶
type CloudDetector ¶
type CloudDetector struct {
// contains filtered or unexported fields
}
CloudDetector handles cloud provider detection
func NewCloudDetector ¶
func NewCloudDetector() *CloudDetector
NewCloudDetector creates a new cloud detector
func (*CloudDetector) DetectProvider ¶
func (cd *CloudDetector) DetectProvider(ctx context.Context) string
DetectProvider tries to detect the cloud provider
func (*CloudDetector) GetMetadata ¶
func (cd *CloudDetector) GetMetadata(ctx context.Context, cloudName, detectedProvider string) map[string]string
GetMetadata returns metadata based on cloud name and detected provider
type CloudDetectorConfig ¶
type CloudDetectorConfig struct {
DetectionTimeout time.Duration // Timeout for detection requests
MetadataTimeout time.Duration // Timeout for metadata requests
OverallTimeout time.Duration // Overall HTTP client timeout
}
CloudDetectorConfig holds timeout configurations
type DeployState ¶
type DeployState struct {
CreatedFiles []string
ServiceEnabled bool // Service has been enabled in systemd
ServiceStarted bool // Service has been started
ServiceName string
DummyIfaceName string
DummyIfaceCreated bool // Interface was actually created (not just attempted)
SystemdReloaded bool // daemon-reload was performed
}
type DeploymentCheckResult ¶
type DeploymentCheckResult struct {
Exists bool
NeedsUpdate bool
BootstrapChanged bool
InterfaceChanged bool
ServiceChanged bool
ServiceNeedsRestart bool
}
DeploymentCheckResult contains information about what needs to be updated
func CheckExistingDeployment ¶
func CheckExistingDeployment(deployReq *client.RequestDeploy, logger *logger.Logger, runner *cmdrunner.CommandsRunner) (*DeploymentCheckResult, error)
CheckExistingDeployment checks if a deployment exists and if it needs updates
type HeartbeatService ¶
type HeartbeatService struct {
// contains filtered or unexported fields
}
HeartbeatService manages periodic ping requests to the controller
func NewHeartbeatService ¶
func NewHeartbeatService(baseLogger *logger.Logger, cfg *config.Config) *HeartbeatService
NewHeartbeatService creates a new heartbeat service
func (*HeartbeatService) Initialize ¶
func (h *HeartbeatService) Initialize(clientID string) error
Initialize creates dedicated gRPC connection and sets client ID
func (*HeartbeatService) SendPing ¶
func (h *HeartbeatService) SendPing() (*client.PingResponse, error)
SendPing sends a single ping request (can be used by other components)
func (*HeartbeatService) SetReregisterCallback ¶
func (h *HeartbeatService) SetReregisterCallback(cb ReregisterCallback)
SetReregisterCallback sets the callback to be called when controller responds with "client not registered"
func (*HeartbeatService) Start ¶
func (h *HeartbeatService) Start() error
Start begins the heartbeat service
func (*HeartbeatService) Stop ¶
func (h *HeartbeatService) Stop()
Stop gracefully stops the heartbeat service
type ReregisterCallback ¶
type ReregisterCallback func()
ReregisterCallback is called when controller responds with "client not registered"
type Services ¶
type Services struct {
// contains filtered or unexported fields
}
func NewServices ¶
func NewServices() *Services
func (*Services) ApplyCommunityList ¶
func (s *Services) ApplyCommunityList(cmd *client.Command, bgpReq *client.RequestBgp, manager bgp.BGPManagerInterface) *client.CommandResponse
func (*Services) ApplyPrefixList ¶
func (s *Services) ApplyPrefixList(cmd *client.Command, bgpReq *client.RequestBgp, manager bgp.BGPManagerInterface) *client.CommandResponse
func (*Services) ApplyRouteMap ¶
func (s *Services) ApplyRouteMap(cmd *client.Command, bgpReq *client.RequestBgp, manager bgp.BGPManagerInterface) *client.CommandResponse
func (*Services) ClearBgpRoutes ¶
func (s *Services) ClearBgpRoutes(cmd *client.Command, bgpReq *client.RequestBgp, manager bgp.BGPManagerInterface) *client.CommandResponse
ClearBgpRoutes clears BGP routes based on clear parameters
func (*Services) ClientStats ¶
func (s *Services) ClientStats(cmd *proto.Command) *proto.CommandResponse
func (*Services) DeployService ¶
func (s *Services) DeployService(cmd *client.Command) *client.CommandResponse
func (*Services) EnvoyVersionService ¶
func (s *Services) EnvoyVersionService(cmd *client.Command) *client.CommandResponse
EnvoyVersionService handles envoy version management commands
func (*Services) FilebeatService ¶
func (s *Services) FilebeatService(cmd *client.Command) *client.CommandResponse
func (*Services) FilebeatServiceAction ¶
func (*Services) FilebeatServiceLogs ¶
func (s *Services) FilebeatServiceLogs(cmd *client.Command) *client.CommandResponse
func (*Services) FrrService ¶
func (s *Services) FrrService(cmd *client.Command) *client.CommandResponse
Handle FRR protocol requests
func (*Services) GeneralLog ¶
func (s *Services) GeneralLog(cmd *client.Command) *client.CommandResponse
func (*Services) GetBgpConfig ¶
func (s *Services) GetBgpConfig(cmd *client.Command, manager bgp.BGPManagerInterface) *client.CommandResponse
func (*Services) GetBgpNeighbor ¶
func (s *Services) GetBgpNeighbor(cmd *client.Command, bgpReq *client.RequestBgp, manager bgp.BGPManagerInterface) *client.CommandResponse
func (*Services) GetBgpPolicyConfig ¶
func (s *Services) GetBgpPolicyConfig(cmd *client.Command, _ *client.RequestBgp, manager bgp.BGPManagerInterface) *client.CommandResponse
func (*Services) GetBgpSummary ¶
func (s *Services) GetBgpSummary(cmd *client.Command, manager bgp.BGPManagerInterface) *client.CommandResponse
func (*Services) GetFilebeatConfig ¶
func (s *Services) GetFilebeatConfig(cmd *client.Command) *client.CommandResponse
func (*Services) GetFilebeatStatus ¶
func (s *Services) GetFilebeatStatus(cmd *client.Command) *client.CommandResponse
func (*Services) GetRsyslogConfig ¶
func (s *Services) GetRsyslogConfig(cmd *client.Command) *client.CommandResponse
func (*Services) GetRsyslogStatus ¶
func (s *Services) GetRsyslogStatus(cmd *client.Command) *client.CommandResponse
func (*Services) HandleBgpNeighbor ¶
func (s *Services) HandleBgpNeighbor(cmd *client.Command, bgpReq *client.RequestBgp, manager bgp.BGPManagerInterface) *client.CommandResponse
func (*Services) ListBgpNeighbors ¶
func (s *Services) ListBgpNeighbors(cmd *client.Command, _ *client.RequestBgp, manager bgp.BGPManagerInterface) *client.CommandResponse
func (*Services) NetworkService ¶
func (s *Services) NetworkService(cmd *client.Command) *client.CommandResponse
func (*Services) ProxyEnvoyAdmin ¶
func (s *Services) ProxyEnvoyAdmin(cmd *client.Command) *client.CommandResponse
func (*Services) RemoveBgpNeighbor ¶
func (s *Services) RemoveBgpNeighbor(cmd *client.Command, bgpReq *client.RequestBgp, manager bgp.BGPManagerInterface) *client.CommandResponse
func (*Services) RemoveCommunityList ¶
func (s *Services) RemoveCommunityList(cmd *client.Command, bgpReq *client.RequestBgp, manager bgp.BGPManagerInterface) *client.CommandResponse
func (*Services) RemovePrefixList ¶
func (s *Services) RemovePrefixList(cmd *client.Command, bgpReq *client.RequestBgp, manager bgp.BGPManagerInterface) *client.CommandResponse
func (*Services) RemoveRouteMap ¶
func (s *Services) RemoveRouteMap(cmd *client.Command, bgpReq *client.RequestBgp, manager bgp.BGPManagerInterface) *client.CommandResponse
func (*Services) RsyslogService ¶
func (s *Services) RsyslogService(cmd *client.Command) *client.CommandResponse
func (*Services) RsyslogServiceAction ¶
func (*Services) RsyslogServiceLogs ¶
func (s *Services) RsyslogServiceLogs(cmd *client.Command) *client.CommandResponse
func (*Services) SetBgpConfig ¶
func (s *Services) SetBgpConfig(cmd *client.Command, bgpReq *client.RequestBgp, bgpManager bgp.BGPManagerInterface) *client.CommandResponse
func (*Services) SetGRPCClient ¶
SetGRPCClient sets the gRPC client for services that need it
func (*Services) ShowBgpRoutes ¶
func (s *Services) ShowBgpRoutes(cmd *client.Command, manager bgp.BGPManagerInterface) *client.CommandResponse
func (*Services) SystemdService ¶
func (s *Services) SystemdService(cmd *client.Command) *client.CommandResponse
func (*Services) SystemdServiceAction ¶
func (s *Services) SystemdServiceAction(cmd *client.Command) *client.CommandResponse
func (*Services) SystemdServiceLogs ¶
func (s *Services) SystemdServiceLogs(cmd *client.Command) *client.CommandResponse
func (*Services) UndeployService ¶
func (s *Services) UndeployService(cmd *client.Command) *client.CommandResponse
func (*Services) UpdateBootstrapService ¶
func (s *Services) UpdateBootstrapService(cmd *client.Command) *client.CommandResponse
func (*Services) UpdateFilebeatConfig ¶
func (s *Services) UpdateFilebeatConfig(cmd *client.Command) *client.CommandResponse
func (*Services) UpdateRsyslogConfig ¶
func (s *Services) UpdateRsyslogConfig(cmd *client.Command) *client.CommandResponse
func (*Services) UpgradeListenerService ¶
func (s *Services) UpgradeListenerService(cmd *client.Command) *client.CommandResponse
func (*Services) WafVersionService ¶
func (s *Services) WafVersionService(cmd *client.Command) *client.CommandResponse
WafVersionService handles WAF version management commands