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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelWait

func CancelWait(p metadata.Plugin)

CancelWait stops the plugin from waiting / retrying to connect

func LazyConnect

func LazyConnect(finder func() (metadata.Plugin, error), retry time.Duration) metadata.Plugin

LazyConnect returns a metadata.Plugin that defers connection to actual method invocation and can optionally block until the connection is made.

func NewPluginFromChannel

func NewPluginFromChannel(writes <-chan func(map[string]interface{})) metadata.Plugin

NewPluginFromChannel returns a plugin implementation where reads and writes are serialized via channel of functions that have a view to the metadata. Closing the write channel stops the serialized read/writes and falls back to unserialized reads.

func NewPluginFromData

func NewPluginFromData(data map[string]interface{}) metadata.Plugin

NewPluginFromData creates a plugin out of a simple data map. Note the updates to the map is not guarded and synchronized with the reads.

func NewUpdatablePlugin

func NewUpdatablePlugin(reader metadata.Plugin, commit CommitFunc) metadata.Updatable

NewUpdatablePlugin assembles the implementations into a Updatable implementation

func UpdatableLazyConnect

func UpdatableLazyConnect(finder func() (metadata.Updatable, error), retry time.Duration) metadata.Updatable

UpdatableLazyConnect returns a metadata.Updatable that defers connection to actual method invocation and can optionally block until the connection is made.

Types

type CommitFunc

type CommitFunc func(proposed *types.Any) error

CommitFunc is the function for handling commit

type LoadFunc

type LoadFunc func() (original *types.Any, err error)

LoadFunc is the function for returning the original to modify

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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