store

package
v0.39.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 19 Imported by: 6 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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      []ocispecs.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(cfg *confutil.Config) (*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