store

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 16 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 ValidateName

func ValidateName(s string) (string, error)

Types

type Node

type Node struct {
	Name       string
	Endpoint   string
	Platforms  []specs.Platform
	Flags      []string
	ConfigFile string
	DriverOpts map[string]string
}

type NodeGroup

type NodeGroup struct {
	Name   string
	Driver string
	Nodes  []Node
}

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, flags []string, configFile 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) 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) Save

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

func (*Txn) SetCurrent

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

Jump to

Keyboard shortcuts

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