metadata

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

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

Cluster is the cluster definition stored in ObjectStorage

func NewCluster

func NewCluster() (*Cluster, error)

NewCluster creates a new Cluster metadata

func (*Cluster) Acquire

func (m *Cluster) Acquire()

Acquire waits until the write lock is available, then locks the metadata

func (*Cluster) Browse

func (m *Cluster) Browse(callback func(*Cluster) error) error

Browse walks through cluster folder and executes a callback for each entry

func (*Cluster) Carry

func (m *Cluster) Carry(cluster *api.ClusterCore) *Cluster

Carry links metadata with cluster struct

func (*Cluster) Delete

func (m *Cluster) Delete() error

Delete removes a cluster metadata

func (*Cluster) Get

func (m *Cluster) Get() *api.ClusterCore

Get returns the content of the metadata

func (*Cluster) Read

func (m *Cluster) Read(name string) (bool, error)

Read reads metadata of cluster named 'name' from Object Storage

func (*Cluster) Release

func (m *Cluster) Release()

Release unlocks the metadata

func (*Cluster) Reload

func (m *Cluster) Reload() error

Reload reloads the metadata from ObjectStorage It's a good idea to do that just after a Acquire() to be sure to have the latest data

func (*Cluster) Write

func (m *Cluster) Write() error

Write saves the content of m to the Object Storage

Jump to

Keyboard shortcuts

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