store

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 19 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateName

func GenerateName(txn *Txn) (string, error)

func IsErrInvalidName added in v0.11.1

func IsErrInvalidName(err error) bool

func ValidateName

func ValidateName(s string) (string, error)

Types

type Node

type Node struct {
	Name           string
	Endpoint       string
	Platforms      []specs.Platform
	DriverOpts     map[string]string
	BuildkitdFlags []string `json:"Flags"` // keep the field name for backward compatibility

	Files map[string][]byte
}

func (*Node) Copy added in v0.9.0

func (n *Node) Copy() *Node

type NodeGroup

type NodeGroup struct {
	Name    string
	Driver  string
	Nodes   []Node
	Dynamic bool

	// skip the following fields from being saved in the store
	DockerContext bool      `json:"-"`
	LastActivity  time.Time `json:"-"`
}

func (*NodeGroup) Copy added in v0.9.0

func (ng *NodeGroup) Copy() *NodeGroup

func (*NodeGroup) Leave

func (ng *NodeGroup) Leave(name string) error

func (*NodeGroup) Update

func (ng *NodeGroup) Update(name, endpoint string, platforms []string, endpointsSet bool, actionAppend bool, buildkitdFlags []string, buildkitdConfigFile string, do map[string]string) error

type Store

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

func New

func New(root string) (*Store, error)

func (*Store) Txn

func (s *Store) Txn() (*Txn, func(), error)

type Txn

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

func (*Txn) Current

func (t *Txn) Current(key string) (*NodeGroup, error)

func (*Txn) GetLastActivity added in v0.10.0

func (t *Txn) GetLastActivity(ng *NodeGroup) (la time.Time, _ error)

func (*Txn) List

func (t *Txn) List() ([]*NodeGroup, error)

func (*Txn) NodeGroupByName

func (t *Txn) NodeGroupByName(name string) (*NodeGroup, error)

func (*Txn) Remove

func (t *Txn) Remove(name string) error

func (*Txn) RemoveLastActivity added in v0.10.0

func (t *Txn) RemoveLastActivity(name string) error

func (*Txn) Save

func (t *Txn) Save(ng *NodeGroup) error

func (*Txn) SetCurrent

func (t *Txn) SetCurrent(key, name string, global, def bool) error

func (*Txn) UpdateLastActivity added in v0.10.0

func (t *Txn) UpdateLastActivity(ng *NodeGroup) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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