boltdb

package
v0.0.0-...-863ebf7 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltDB

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

BoltDB has a connection to the database and implements the needed interfaces.

func New

func New(path string) (*BoltDB, func() error, error)

New creates a new BoltDB instance

func (*BoltDB) CreateDeployment

func (bdb *BoltDB) CreateDeployment(pipeline signalcd.Pipeline) (signalcd.Deployment, error)

CreateDeployment creates a new Deployment from a Pipeline

func (*BoltDB) CreatePipeline

func (bdb *BoltDB) CreatePipeline(p signalcd.Pipeline) (signalcd.Pipeline, error)

CreatePipeline saves a Pipeline and returns the saved Pipeline

func (*BoltDB) GetCurrentDeployment

func (bdb *BoltDB) GetCurrentDeployment() (signalcd.Deployment, error)

GetCurrentDeployment gets the current Deployment

func (*BoltDB) GetPipeline

func (bdb *BoltDB) GetPipeline(id string) (signalcd.Pipeline, error)

GetPipeline gets a Pipeline by its ID

func (*BoltDB) ListDeployments

func (bdb *BoltDB) ListDeployments() ([]signalcd.Deployment, error)

ListDeployments lists all Deployments

func (*BoltDB) ListPipelines

func (bdb *BoltDB) ListPipelines() ([]signalcd.Pipeline, error)

ListPipelines returns a list of Pipelines

func (*BoltDB) SaveStepLogs

func (bdb *BoltDB) SaveStepLogs(ctx context.Context, deployment, step int64, logs []byte) error

SaveStepLogs saves the logs for a Deployment step by its number

func (*BoltDB) UpdateDeploymentStatus

func (bdb *BoltDB) UpdateDeploymentStatus(deploymentNumber int64, step int64, agent string, phase signalcd.Phase) (signalcd.Deployment, error)

type Events

type Events struct {
	*BoltDB
	// contains filtered or unexported fields
}

Events wraps BoltDB to publish updated structs

func NewEvents

func NewEvents(db *BoltDB, events *signalcd.Events) *Events

NewEvents creates a new BoltDB wrapper that publishes events

func (*Events) CreateDeployment

func (e *Events) CreateDeployment(pipeline signalcd.Pipeline) (signalcd.Deployment, error)

CreateDeployment wraps the underlying BoltDB func to publish successfully created Deployments

func (*Events) UpdateDeploymentStatus

func (e *Events) UpdateDeploymentStatus(deploymentNumber int64, step int64, agent string, phase signalcd.Phase) (signalcd.Deployment, error)

Jump to

Keyboard shortcuts

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