tribe

package
v0.16.0-beta Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2016 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONFIG_CONSTRAINTS = `` /* 403-byte string literal not displayed */

)
View Source
const (
	HandlerRegistrationName = "tribe"
)
View Source
const (
	TaskStateQueryResponseSizeLimit int = 1024
)

Variables

View Source
var (

	// Flags consumed by snapd
	Flags = []cli.Flag{flTribeNodeName, flTribe, flTribeSeed, flTribeAdvertiseAddr, flTribeAdvertisePort}
)

Functions

func New

func New(cfg *Config) (*tribe, error)

Types

type Config

type Config struct {
	Name                      string             `json:"name"yaml:"name"`
	Enable                    bool               `json:"enable"yaml:"enable"`
	BindAddr                  string             `json:"bind_addr"yaml:"bind_addr"`
	BindPort                  int                `json:"bind_port"yaml:"bind_port"`
	Seed                      string             `json:"seed"yaml:"seed"`
	MemberlistConfig          *memberlist.Config `json:"-"yaml:"-"`
	RestAPIProto              string             `json:"-"yaml:"-"`
	RestAPIPassword           string             `json:"-"yaml:"-"`
	RestAPIPort               int                `json:"-"yaml:"-"`
	RestAPIInsecureSkipVerify string             `json:"-"yaml:"-"`
}

holds the configuration passed in through the SNAP config file

Note: if this struct is modified, then the switch statement in the
      UnmarshalJSON method in this same file needs to be modified to
      match the field mapping that is defined here

func GetDefaultConfig

func GetDefaultConfig() *Config

get the default snapd configuration

func (*Config) UnmarshalJSON

func (c *Config) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals valid json into a Config. An example Config can be found at github.com/intelsdi-x/snap/blob/master/examples/configs/snap-config-sample.json

type LClock

type LClock struct {
	Inc uint64
}

func (*LClock) Increment

func (l *LClock) Increment() LTime

Increment

func (*LClock) Time

func (l *LClock) Time() LTime

Time returns the current value of the clock

func (*LClock) Update

func (l *LClock) Update(lt LTime)

Update

type LTime

type LTime uint64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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