Documentation ¶
Index ¶
- func FetchDockerID(snapshot portainer.DockerSnapshot) (string, error)
- func FillSnapshotData(dataStore dataservices.DataStore, endpoint *portainer.Endpoint) error
- func SupportDirectSnapshot(endpoint *portainer.Endpoint) bool
- type Service
- func (service *Service) Create(snapshot portainer.Snapshot) error
- func (service *Service) FillSnapshotData(endpoint *portainer.Endpoint) error
- func (service *Service) SetSnapshotInterval(snapshotInterval string) error
- func (service *Service) SnapshotEndpoint(endpoint *portainer.Endpoint) error
- func (service *Service) Start()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchDockerID ¶
func FetchDockerID(snapshot portainer.DockerSnapshot) (string, error)
FetchDockerID fetches info.Swarm.Cluster.ID if environment(endpoint) is swarm and info.ID otherwise
func FillSnapshotData ¶
func FillSnapshotData(dataStore dataservices.DataStore, endpoint *portainer.Endpoint) error
func SupportDirectSnapshot ¶
SupportDirectSnapshot checks whether an environment(endpoint) can be used to trigger a direct a snapshot. It is mostly true for all environments(endpoints) except Edge and Azure environments(endpoints).
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service repesents a service to manage environment(endpoint) snapshots. It provides an interface to start background snapshots as well as specific Docker/Kubernetes environment(endpoint) snapshot methods.
func NewService ¶
func NewService(snapshotIntervalFromFlag string, dataStore dataservices.DataStore, dockerSnapshotter portainer.DockerSnapshotter, kubernetesSnapshotter portainer.KubernetesSnapshotter, shutdownCtx context.Context) (*Service, error)
NewService creates a new instance of a service
func (*Service) FillSnapshotData ¶
func (*Service) SetSnapshotInterval ¶
SetSnapshotInterval sets the snapshot interval and resets the service
func (*Service) SnapshotEndpoint ¶
SnapshotEndpoint will create a snapshot of the environment(endpoint) based on the environment(endpoint) type. If the snapshot is a success, it will be associated to the environment(endpoint).