Documentation
¶
Index ¶
- Constants
- func BlockUntilCertificateIsReady(certPath, keyPath string, retryInterval time.Duration)
- func HasServerConnectivity(options *agent.Options) bool
- func ParseEdgeKey(key string) (*edgeKey, error)
- func RetrieveEdgeKey(edgeKey string, clusterService agent.ClusterService, dataPath string) (string, error)
- type EdgeAsyncCommandOperation
- type EdgeAsyncCommandType
- type Manager
- func (manager *Manager) CreateEdgeConfig(config *client.EdgeConfig) error
- func (manager *Manager) DeleteEdgeConfig(config *client.EdgeConfig) error
- func (manager *Manager) GetEndpointID() portainer.EndpointID
- func (manager *Manager) GetKey() string
- func (manager *Manager) GetStackManager() *stack.StackManager
- func (manager *Manager) IsKeySet() bool
- func (manager *Manager) MetricsHandler() *agentmetrics.Handler
- func (manager *Manager) PropagateKeyInCluster() error
- func (manager *Manager) ResetActivityTimer()
- func (manager *Manager) SetEndpointID(endpointID portainer.EndpointID)
- func (manager *Manager) SetKey(key string) error
- func (manager *Manager) Start() error
- func (manager *Manager) UpdateEdgeConfig(config *client.EdgeConfig) error
- type ManagerParameters
- type PollService
- func (service *PollService) RegisterPollHook(h policyreconcile.PollHook)
- func (service *PollService) RegisterReconcilerFactory(policyType string, f policyreconcile.HandlerFactory)
- func (service *PollService) SetChartReporter(r *helm.ChartStatusReporter)
- func (service *PollService) Start()
- func (service *PollService) Stop()
Constants ¶
const ( EdgeAsyncCommandTypeConfig EdgeAsyncCommandType = "edgeConfig" EdgeAsyncCommandTypeStack EdgeAsyncCommandType = "edgeStack" EdgeAsyncCommandTypeJob EdgeAsyncCommandType = "edgeJob" EdgeAsyncCommandTypeLog EdgeAsyncCommandType = "edgeLog" EdgeAsyncCommandTypeContainer EdgeAsyncCommandType = "container" EdgeAsyncCommandTypeImage EdgeAsyncCommandType = "image" EdgeAsyncCommandTypeVolume EdgeAsyncCommandType = "volume" EdgeAsyncCommandTypeNormalStack EdgeAsyncCommandType = "normalStack" EdgeAsyncCommandOpAdd EdgeAsyncCommandOperation = "add" EdgeAsyncCommandOpRemove EdgeAsyncCommandOperation = "remove" EdgeAsyncCommandOpReplace EdgeAsyncCommandOperation = "replace" )
Variables ¶
This section is empty.
Functions ¶
func BlockUntilCertificateIsReady ¶
BlockUntilCertificateIsReady blocks the server start until the TLS certificates are ready
func HasServerConnectivity ¶
HasServerConnectivity performs a one-shot connectivity check against the Portainer API server and, when configured, the tunnel server. Results are printed to stdout. Returns true if all checks pass, false if any fail.
func ParseEdgeKey ¶
parseEdgeKey decodes a base64 encoded key and extract the decoded information from the following format: <portainer_instance_url>|<tunnel_server_addr>|<tunnel_server_fingerprint>|<endpoint_id>
func RetrieveEdgeKey ¶
Types ¶
type EdgeAsyncCommandOperation ¶
type EdgeAsyncCommandOperation string
type EdgeAsyncCommandType ¶
type EdgeAsyncCommandType string
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is used to manage all Edge features through multiple sub-components. It is mainly responsible for running the Edge background process.
func NewManager ¶
func NewManager(parameters *ManagerParameters) *Manager
NewManager returns a pointer to a new instance of Manager
func (*Manager) CreateEdgeConfig ¶
func (manager *Manager) CreateEdgeConfig(config *client.EdgeConfig) error
func (*Manager) DeleteEdgeConfig ¶
func (manager *Manager) DeleteEdgeConfig(config *client.EdgeConfig) error
func (*Manager) GetEndpointID ¶
func (manager *Manager) GetEndpointID() portainer.EndpointID
GetEndpointID gets the endpointID of the agent
func (*Manager) GetStackManager ¶
func (manager *Manager) GetStackManager() *stack.StackManager
func (*Manager) MetricsHandler ¶
func (manager *Manager) MetricsHandler() *agentmetrics.Handler
MetricsHandler returns the agent metrics handler for the /api/metrics endpoint. Returns nil when metrics collection is not enabled for the current platform.
func (*Manager) PropagateKeyInCluster ¶
PropagateKeyInCluster propagates the Edge key associated to the agent to all the other agents inside the cluster
func (*Manager) ResetActivityTimer ¶
func (manager *Manager) ResetActivityTimer()
ResetActivityTimer resets the activity timer
func (*Manager) SetEndpointID ¶
func (manager *Manager) SetEndpointID(endpointID portainer.EndpointID)
SetEndpointID set the endpointID of the agent
func (*Manager) SetKey ¶
SetKey parses and associates an Edge key to the agent. If the agent is running inside a cluster, it will also set the "set" flag to specify that a key is set on this agent in the cluster.
func (*Manager) UpdateEdgeConfig ¶
func (manager *Manager) UpdateEdgeConfig(config *client.EdgeConfig) error
type ManagerParameters ¶
type ManagerParameters struct {
Options *agent.Options
AdvertiseAddr string
ClusterService agent.ClusterService
DockerInfoService agent.DockerInfoService
ContainerPlatform agent.ContainerPlatform
KubeClient *kubernetes.KubeClient
}
ManagerParameters represents an object used to create a Manager
type PollService ¶
type PollService struct {
// contains filtered or unexported fields
}
PollService is used to poll a Portainer instance to retrieve the status associated to the Edge endpoint. It is responsible for managing the state of the reverse tunnel (open and closing after inactivity). It is also responsible for retrieving the data associated to Edge stacks and schedules.
func (*PollService) RegisterPollHook ¶
func (service *PollService) RegisterPollHook(h policyreconcile.PollHook)
RegisterPollHook registers a PollHook that will be called every poll cycle via Tick. Intended for handler packages (e.g. helm.RestoreCoordinator) that need cross-poll work outside the reconciler's per-cycle Apply/Remove lifecycle.
func (*PollService) RegisterReconcilerFactory ¶
func (service *PollService) RegisterReconcilerFactory(policyType string, f policyreconcile.HandlerFactory)
RegisterReconcilerFactory registers a HandlerFactory with the reconciler. Called at boot for each platform-specific policy handler type.
func (*PollService) SetChartReporter ¶
func (service *PollService) SetChartReporter(r *helm.ChartStatusReporter)
SetChartReporter registers the helm ChartStatusReporter used for legacy dual-emit. Called at boot on K8s agents only; nil on Docker/Podman agents.
func (*PollService) Start ¶
func (service *PollService) Start()
func (*PollService) Stop ¶
func (service *PollService) Stop()
Directories
¶
| Path | Synopsis |
|---|---|
|
Package pkcs7 implements the subset of the CMS PKCS #7 datatype that is typically used to package certificates and CRLs.
|
Package pkcs7 implements the subset of the CMS PKCS #7 datatype that is typically used to package certificates and CRLs. |