metadata

package
v0.0.0-...-a355528 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {

	// DoList implements List via function
	DoList func(path types.Path) (child []string, err error)

	// DoGet implements Get via function
	DoGet func(path types.Path) (value *types.Any, err error)
}

Plugin implements metadata.Plugin

func (*Plugin) Get

func (t *Plugin) Get(path types.Path) (value *types.Any, err error)

Get gets the value

func (*Plugin) List

func (t *Plugin) List(path types.Path) (child []string, err error)

List lists the child nodes under path

type Updatable

type Updatable struct {
	Plugin

	// DoChanges sends a batch of changes and gets in return a proposed view of configuration and a cas hash.
	DoChanges func(changes []metadata.Change) (original, proposed *types.Any, cas string, err error)

	// DoCommit asks the plugin to commit the proposed view with the cas.  The cas is used for
	// optimistic concurrency control.
	DoCommit func(proposed *types.Any, cas string) error
}

Updatable implements metadata.Updatable

func (*Updatable) Changes

func (u *Updatable) Changes(changes []metadata.Change) (original, proposed *types.Any, cas string, err error)

Changes sends a batch of changes and gets in return a proposed view of configuration and a cas hash.

func (*Updatable) Commit

func (u *Updatable) Commit(proposed *types.Any, cas string) error

Commit asks the plugin to commit the proposed view with the cas. The cas is used for mvcc

Jump to

Keyboard shortcuts

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