Documentation ¶
Index ¶
- Constants
- type Service
- func (service *Service) BucketName() string
- func (service *Service) Create(endpoint *portainer.Endpoint) error
- func (service *Service) DeleteEndpoint(ID portainer.EndpointID) error
- func (service *Service) Endpoint(ID portainer.EndpointID) (*portainer.Endpoint, error)
- func (service *Service) EndpointIDByEdgeID(edgeID string) (portainer.EndpointID, bool)
- func (service *Service) Endpoints() ([]portainer.Endpoint, error)
- func (service *Service) GetNextIdentifier() int
- func (service *Service) Heartbeat(endpointID portainer.EndpointID) (int64, bool)
- func (service *Service) UpdateEndpoint(ID portainer.EndpointID, endpoint *portainer.Endpoint) error
- func (service *Service) UpdateHeartbeat(endpointID portainer.EndpointID)
Constants ¶
View Source
const (
// BucketName represents the name of the bucket where this service stores data.
BucketName = "endpoints"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents a service for managing environment(endpoint) data.
func NewService ¶
func NewService(connection portainer.Connection) (*Service, error)
NewService creates a new instance of a service.
func (*Service) BucketName ¶
func (*Service) DeleteEndpoint ¶
func (service *Service) DeleteEndpoint(ID portainer.EndpointID) error
DeleteEndpoint deletes an environment(endpoint).
func (*Service) EndpointIDByEdgeID ¶
func (service *Service) EndpointIDByEdgeID(edgeID string) (portainer.EndpointID, bool)
EndpointIDByEdgeID returns the EndpointID from the given EdgeID using an in-memory index
func (*Service) GetNextIdentifier ¶
GetNextIdentifier returns the next identifier for an environment(endpoint).
func (*Service) Heartbeat ¶
func (service *Service) Heartbeat(endpointID portainer.EndpointID) (int64, bool)
func (*Service) UpdateEndpoint ¶
UpdateEndpoint updates an environment(endpoint).
func (*Service) UpdateHeartbeat ¶
func (service *Service) UpdateHeartbeat(endpointID portainer.EndpointID)
Click to show internal directories.
Click to hide internal directories.