edgestack

package
v0.0.0-...-270f78c Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Zlib Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BucketName represents the name of the bucket where this service stores data.
	BucketName = "edge_stack"
)

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 Edge stack data.

func NewService

func NewService(connection portainer.Connection, cacheInvalidationFn func(portainer.EdgeStackID)) (*Service, error)

NewService creates a new instance of a service.

func (*Service) BucketName

func (service *Service) BucketName() string

func (*Service) Create

func (service *Service) Create(id portainer.EdgeStackID, edgeStack *portainer.EdgeStack) error

CreateEdgeStack saves an Edge stack object to db.

func (*Service) DeleteEdgeStack

func (service *Service) DeleteEdgeStack(ID portainer.EdgeStackID) error

DeleteEdgeStack deletes an Edge stack.

func (*Service) EdgeStack

func (service *Service) EdgeStack(ID portainer.EdgeStackID) (*portainer.EdgeStack, error)

EdgeStack returns an Edge stack by ID.

func (*Service) EdgeStackVersion

func (service *Service) EdgeStackVersion(ID portainer.EdgeStackID) (int, bool)

EdgeStackVersion returns the version of the given edge stack ID directly from an in-memory index

func (*Service) EdgeStacks

func (service *Service) EdgeStacks() ([]portainer.EdgeStack, error)

EdgeStacks returns an array containing all edge stacks

func (*Service) GetNextIdentifier

func (service *Service) GetNextIdentifier() int

GetNextIdentifier returns the next identifier for an environment(endpoint).

func (*Service) UpdateEdgeStack deprecated

func (service *Service) UpdateEdgeStack(ID portainer.EdgeStackID, edgeStack *portainer.EdgeStack) error

Deprecated: Use UpdateEdgeStackFunc instead.

func (*Service) UpdateEdgeStackFunc

func (service *Service) UpdateEdgeStackFunc(ID portainer.EdgeStackID, updateFunc func(edgeStack *portainer.EdgeStack)) error

UpdateEdgeStackFunc updates an Edge stack inside a transaction avoiding data races.

Jump to

Keyboard shortcuts

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