ecc

package
v0.0.0-...-bc8b7e0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2015 License: MPL-2.0, Apache-2.0 Imports: 19 Imported by: 4

README

ecc

Circle CI Coverage Status

Embedded Clustering Client. Currently using Consul.

Documentation

Index

Constants

View Source
const (
	OK = iota
	OUTDATED
	ERROR
)
View Source
const (
	NOTIFY_UPDATE_ADD = iota
	NOTIFY_UPDATE_MODIFY
	NOTIFY_UPDATE_DELETE
)
View Source
const (
	WATCH_TYPE_NODE = iota
	WATCH_TYPE_KEY
	WATCH_TYPE_STORE
	WATCH_TYPE_EVENT
)
View Source
const CONSUL_BASE_URL = "http://localhost:8500/v1/"
View Source
const CONSUL_KV_BASE_URL = "http://localhost:8500/v1/kv/"
View Source
const Version = "0.4.1"

The main version number that is being run at the moment.

View Source
const VersionPrerelease = ""

A pre-release marker for the version. If this is "" (empty string) then it means that it is a final release. Otherwise, this is a pre-release such as "dev" (in development), "beta", "rc1", etc.

Variables

Commands is the mapping of all the available Consul commands.

View Source
var GitCommit string

The git commit that was compiled. This will be filled in by the compiler.

View Source
var GitDescribe string
View Source
var OfflineSupport bool = true

Functions

func ConsulGet

func ConsulGet(url string) (string, bool)

func Delete

func Delete(store string, key string) eccerror

func Execute

func Execute(args ...string) int

Execute function is borrowed from Consul's main.go

func Get

func Get(store string, key string) ([]byte, int, bool)

func GetAll

func GetAll(store string) ([][]byte, []int, bool)

func HasStarted

func HasStarted() bool

func Join

func Join(address string) error

func Leave

func Leave() error

func Put

func Put(store string, key string, value []byte, oldValue []byte) eccerror

func RegisterForKeyUpdates

func RegisterForKeyUpdates(store string, key string, listener Listener)

func RegisterForNodeUpdates

func RegisterForNodeUpdates(listener Listener)

func RegisterForStoreUpdates

func RegisterForStoreUpdates(store string, listener Listener)

func Start

func Start(serverMode bool, bootstrap bool, bindInterface string, dataDir string) error

Types

type Listener

type Listener interface {
	NotifyNodeUpdate(NotifyUpdateType, string)
	NotifyKeyUpdate(NotifyUpdateType, string, []byte)
	NotifyStoreUpdate(NotifyUpdateType, string, map[string][]byte)
}

type NotifyUpdateType

type NotifyUpdateType int

type Store

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

type WatchType

type WatchType int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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