registry

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Change

type Change Path

func (Change) Path

func (c Change) Path() string

func (Change) Valid

func (c Change) Valid() bool

type Conditions

type Conditions struct {
	Timeout *Timeout `json:"timeout,omitempty"`

	Create  *Create  `json:"create,omitempty"`  // if node created
	Delete  *Delete  `json:"delete,omitempty"`  // if node deleted
	Change  *Change  `json:"change,omitempty"`  // if node value changed
	Members *Members `json:"members,omitempty"` // if node members changed

	// Default is ANY of the condition met will fire.
	All bool `json:"all,omitempty"`
}

type Create

type Create Path

func (Create) Path

func (e Create) Path() string

func (Create) Valid

func (e Create) Valid() bool

type Delete

type Delete Path

func (Delete) Path

func (d Delete) Path() string

func (Delete) Valid

func (d Delete) Valid() bool

type Key

type Key interface {
	Valid() bool
	Path() string
}

type Members

type Members struct {
	Top          Path   `json:"path"`
	Min          *int32 `json:"min,omitempty"`
	Max          *int32 `json:"max,omitempty"`
	Equals       *int32 `json:"eq,omitempty"`
	OutsideRange bool   `json:"outside_range,omitempty"` // default is within range.  true for outside range.
	Delta        *int32 `json:"delta,omitempty"`         // delta of count
}

func (Members) Path

func (m Members) Path() string

func (Members) Valid

func (m Members) Valid() bool

type Path

type Path string

func NewPath

func NewPath(s string, parts ...string) Path

func (Path) Base

func (this Path) Base() string

func (Path) Dir

func (this Path) Dir() Path

func (Path) Member

func (p Path) Member(k string) Path

func (Path) Parts

func (this Path) Parts() []string

func (Path) Path

func (p Path) Path() string

func (Path) Sub

func (this Path) Sub(parts ...string) Path

func (Path) Valid

func (p Path) Valid() bool

type Timeout

type Timeout time.Duration

func (*Timeout) MarshalJSON

func (this *Timeout) MarshalJSON() ([]byte, error)

func (*Timeout) UnmarshalJSON

func (this *Timeout) UnmarshalJSON(s []byte) error

Jump to

Keyboard shortcuts

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