persister

package
v0.0.0-...-d1a390d Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoPersister

type MongoPersister struct {
	// contains filtered or unexported fields
}

func NewMongoPersister

func NewMongoPersister(c config.PersisterMongo) *MongoPersister

func (MongoPersister) GetTaskByID

func (MongoPersister) GetTaskByID(id string) (*model.Task, error)

func (MongoPersister) GetTaskDefinitionByID

func (MongoPersister) GetTaskDefinitionByID(id string) (*model.TaskDefinition, error)

func (MongoPersister) Prepare

func (p MongoPersister) Prepare() error

func (MongoPersister) SaveAgent

func (MongoPersister) SaveAgent(agent model.Agent) error

func (MongoPersister) SaveTask

func (MongoPersister) SaveTask(task model.Task) error

func (MongoPersister) SaveTaskDefinition

func (MongoPersister) SaveTaskDefinition(taskDefinition model.TaskDefinition) error

type Persister

type Persister interface {
	Prepare() error

	SaveTask(task model.Task) error
	GetTaskByID(id string) (*model.Task, error)

	SaveTaskDefinition(taskDefinition model.TaskDefinition) error
	GetTaskDefinitionByID(id string) (*model.TaskDefinition, error)

	SaveAgent(agent model.Agent) error
}

Jump to

Keyboard shortcuts

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