tree

package
v0.8.12 Latest Latest
Warning

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

Go to latest
Published: May 18, 2017 License: BSD-2-Clause, BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Action        string              `json:"action,omitempty"`
	Type          string              `json:"type,omitempty"`
	Bucket        proto.Bucket        `json:"bucket,omitempty"`
	Check         proto.Check         `json:"check,omitempty"`
	CheckInstance proto.CheckInstance `json:"check_instance,omitempty"`
	ChildCluster  proto.Cluster       `json:"child_cluster,omitempty"`
	ChildGroup    proto.Group         `json:"child_group,omitempty"`
	ChildNode     proto.Node          `json:"child_node,omitempty"`
	ChildType     string              `json:"child_type,omitempty"`
	Cluster       proto.Cluster       `json:"cluster,omitempty"`
	Group         proto.Group         `json:"group,omitempty"`
	Node          proto.Node          `json:"node,omitempty"`
	Property      proto.Property      `json:"property,omitempty"`
	Repository    proto.Repository    `json:"repository,omitempty"`
}

type AttachRequest

type AttachRequest struct {
	Root       Receiver
	ParentType string
	ParentId   string
	ParentName string
}

type Attacher

type Attacher interface {
	Propertier
	Checker

	Attach(a AttachRequest)
	Destroy()
	Detach()
	GetName() string
	ComputeCheckInstances()
	ClearLoadInfo()
	// contains filtered or unexported methods
}

type Bucket

type Bucket struct {
	Id              uuid.UUID
	Name            string
	Environment     string
	Type            string
	State           string
	Frozen          bool
	Deleted         bool
	Repository      uuid.UUID
	Team            uuid.UUID
	Parent          BucketReceiver `json:"-"`
	Fault           *Fault         `json:"-"`
	PropertyOncall  map[string]Property
	PropertyService map[string]Property
	PropertySystem  map[string]Property
	PropertyCustom  map[string]Property
	Checks          map[string]Check
	Children        map[string]BucketAttacher //`json:"-"`
	Action          chan *Action              `json:"-"`
}

func NewBucket

func NewBucket(spec BucketSpec) *Bucket

NEW

func (*Bucket) Attach

func (teb *Bucket) Attach(a AttachRequest)

Interface: Attacher

func (*Bucket) ClearLoadInfo

func (teb *Bucket) ClearLoadInfo()

func (Bucket) CloneRepository

func (teb Bucket) CloneRepository() RepositoryAttacher

func (*Bucket) ComputeCheckInstances

func (teb *Bucket) ComputeCheckInstances()

func (*Bucket) DeleteCheck

func (teb *Bucket) DeleteCheck(c Check)

func (*Bucket) DeleteProperty

func (teb *Bucket) DeleteProperty(p Property)

func (*Bucket) Destroy

func (teb *Bucket) Destroy()

func (*Bucket) Detach

func (teb *Bucket) Detach()

func (*Bucket) Find

func (teb *Bucket) Find(f FindRequest, b bool) Attacher

Interface: Finder

func (*Bucket) GetBucket

func (teb *Bucket) GetBucket() Receiver

Interface: Bucketeer

func (*Bucket) GetEnvironment

func (teb *Bucket) GetEnvironment() string

func (*Bucket) GetID

func (teb *Bucket) GetID() string

Interface: Builder

func (*Bucket) GetName

func (teb *Bucket) GetName() string

func (*Bucket) GetRepository

func (teb *Bucket) GetRepository() string

func (*Bucket) GetRepositoryName

func (teb *Bucket) GetRepositoryName() string

func (*Bucket) GetType

func (teb *Bucket) GetType() string

func (*Bucket) LoadInstance

func (teb *Bucket) LoadInstance(i CheckInstance)

XXX

func (*Bucket) Receive

func (teb *Bucket) Receive(r ReceiveRequest)

Interface: Receiver

func (*Bucket) SetCheck

func (teb *Bucket) SetCheck(c Check)

func (*Bucket) SetProperty

func (teb *Bucket) SetProperty(p Property)
func (teb *Bucket) Unlink(u UnlinkRequest)

Interface: Unlinker

func (*Bucket) UpdateProperty

func (teb *Bucket) UpdateProperty(p Property)

type BucketAttacher

type BucketAttacher interface {
	Attacher

	CloneBucket() BucketAttacher
	ReAttach(a AttachRequest)
	// contains filtered or unexported methods
}

implemented by: groups, clusters, nodes

type BucketReceiver

type BucketReceiver interface {
	Receiver
	BucketUnlinker
	// contains filtered or unexported methods
}

implemented by: repositories

type BucketSpec

type BucketSpec struct {
	Id          string
	Name        string
	Environment string
	Team        string
	Repository  string
	Deleted     bool
	Frozen      bool
}

type BucketUnlinker

type BucketUnlinker interface {
	Unlinker
	// contains filtered or unexported methods
}

type Bucketeer

type Bucketeer interface {
	GetBucket() Receiver
	GetEnvironment() string
	GetRepository() string
	GetRepositoryName() string
}

type Builder

type Builder interface {
	GetID() string
	GetName() string
	GetType() string
}

type Check

type Check struct {
	Id            uuid.UUID
	SourceId      uuid.UUID
	SourceType    string
	Inherited     bool
	InheritedFrom uuid.UUID
	CapabilityId  uuid.UUID
	ConfigId      uuid.UUID
	Inheritance   bool
	ChildrenOnly  bool
	View          string
	Interval      uint64
	Thresholds    []CheckThreshold
	Constraints   []CheckConstraint
	Items         []CheckItem
}

func (*Check) Clone

func (c *Check) Clone() Check

func (*Check) GetCapabilityId

func (c *Check) GetCapabilityId() string

func (*Check) GetCheckConfigId

func (c *Check) GetCheckConfigId() string

func (*Check) GetCheckId

func (c *Check) GetCheckId() string

func (*Check) GetChildrenOnly

func (c *Check) GetChildrenOnly() bool

func (*Check) GetInheritance

func (c *Check) GetInheritance() bool

func (*Check) GetInheritedFrom

func (c *Check) GetInheritedFrom() string

func (*Check) GetInterval

func (c *Check) GetInterval() uint64

func (*Check) GetIsInherited

func (c *Check) GetIsInherited() bool

func (*Check) GetItemId

func (c *Check) GetItemId(objType string, objId uuid.UUID) uuid.UUID

func (*Check) GetSourceCheckId

func (c *Check) GetSourceCheckId() string

func (*Check) GetSourceType

func (c *Check) GetSourceType() string

func (*Check) GetView

func (c *Check) GetView() string

func (*Check) MakeAction

func (c *Check) MakeAction() Action

type CheckConstraint

type CheckConstraint struct {
	Type  string
	Key   string
	Value string
}

func (*CheckConstraint) Clone

func (cc *CheckConstraint) Clone() CheckConstraint

type CheckGetter

type CheckGetter interface {
	GetCheckId() string
	GetSourceCheckId() string
	GetCheckConfigId() string
	GetSourceType() string
	GetIsInherited() bool
	GetInheritedFrom() string
	GetInheritance() bool
	GetChildrenOnly() bool
	GetView() string
	GetCapabilityId() string
	GetInterval() uint64
	GetItemId(objType string, objId uuid.UUID) uuid.UUID
}

type CheckInstance

type CheckInstance struct {
	InstanceId            uuid.UUID
	CheckId               uuid.UUID
	ConfigId              uuid.UUID
	InstanceConfigId      uuid.UUID
	Version               uint64
	ConstraintHash        string
	ConstraintValHash     string
	ConstraintOncall      string                         // Ids
	ConstraintService     map[string]string              // svcName->value
	ConstraintSystem      map[string]string              // Id->value
	ConstraintCustom      map[string]string              // Id->value
	ConstraintNative      map[string]string              // prop->value
	ConstraintAttribute   map[string]map[string][]string // svcId->attr->[ value, value, ... ]
	InstanceServiceConfig map[string]string              // attr->value
	InstanceService       string
	InstanceSvcCfgHash    string
}

func (*CheckInstance) Clone

func (tci *CheckInstance) Clone() CheckInstance

func (CheckInstance) MakeAction

func (ci CheckInstance) MakeAction() Action

type CheckItem

type CheckItem struct {
	ObjectId   uuid.UUID
	ObjectType string
	ItemId     uuid.UUID
}

func (*CheckItem) Clone

func (ci *CheckItem) Clone() CheckItem

type CheckThreshold

type CheckThreshold struct {
	Predicate string
	Level     uint8
	Value     int64
}

func (*CheckThreshold) Clone

func (ct *CheckThreshold) Clone() CheckThreshold

type Checker

type Checker interface {
	SetCheck(c Check)
	LoadInstance(i CheckInstance)
	DeleteCheck(c Check)
	// contains filtered or unexported methods
}

type Cluster

type Cluster struct {
	Id              uuid.UUID
	Name            string
	State           string
	Team            uuid.UUID
	Type            string
	Parent          ClusterReceiver `json:"-"`
	Fault           *Fault          `json:"-"`
	Action          chan *Action    `json:"-"`
	PropertyOncall  map[string]Property
	PropertyService map[string]Property
	PropertySystem  map[string]Property
	PropertyCustom  map[string]Property
	Checks          map[string]Check
	CheckInstances  map[string][]string
	Instances       map[string]CheckInstance
	Children        map[string]ClusterAttacher `json:"-"`
	// contains filtered or unexported fields
}

func NewCluster

func NewCluster(spec ClusterSpec) *Cluster

NEW

func (*Cluster) Attach

func (tec *Cluster) Attach(a AttachRequest)

Interface: Attacher

func (*Cluster) ClearLoadInfo

func (tec *Cluster) ClearLoadInfo()

func (Cluster) Clone

func (tec Cluster) Clone() *Cluster

func (Cluster) CloneBucket

func (tec Cluster) CloneBucket() BucketAttacher

func (Cluster) CloneGroup

func (tec Cluster) CloneGroup() GroupAttacher

func (*Cluster) ComputeCheckInstances

func (tec *Cluster) ComputeCheckInstances()

func (*Cluster) DeleteCheck

func (tec *Cluster) DeleteCheck(c Check)

func (*Cluster) DeleteProperty

func (tec *Cluster) DeleteProperty(p Property)

func (*Cluster) Destroy

func (tec *Cluster) Destroy()

func (*Cluster) Detach

func (tec *Cluster) Detach()

func (*Cluster) Find

func (tec *Cluster) Find(f FindRequest, b bool) Attacher

Interface: Finder

func (*Cluster) GetBucket

func (tec *Cluster) GetBucket() Receiver

Interface: Bucketeer

func (*Cluster) GetEnvironment

func (tec *Cluster) GetEnvironment() string

func (*Cluster) GetID

func (tec *Cluster) GetID() string

Interface: Builder

func (*Cluster) GetName

func (tec *Cluster) GetName() string

func (*Cluster) GetRepository

func (tec *Cluster) GetRepository() string

func (*Cluster) GetRepositoryName

func (tec *Cluster) GetRepositoryName() string

func (*Cluster) GetType

func (tec *Cluster) GetType() string

func (*Cluster) LoadInstance

func (tec *Cluster) LoadInstance(i CheckInstance)

func (*Cluster) ReAttach

func (tec *Cluster) ReAttach(a AttachRequest)

func (*Cluster) Receive

func (tec *Cluster) Receive(r ReceiveRequest)

Interface: Receiver

func (*Cluster) SetCheck

func (tec *Cluster) SetCheck(c Check)

func (*Cluster) SetProperty

func (tec *Cluster) SetProperty(p Property)
func (tec *Cluster) Unlink(u UnlinkRequest)

Interface: Unlinker

func (*Cluster) UpdateProperty

func (tec *Cluster) UpdateProperty(p Property)

type ClusterAttacher

type ClusterAttacher interface {
	Attacher

	CloneCluster() ClusterAttacher
	ReAttach(a AttachRequest)
	// contains filtered or unexported methods
}

implemented by: nodes

type ClusterReceiver

type ClusterReceiver interface {
	Receiver
	ClusterUnlinker
	// contains filtered or unexported methods
}

implemented by: buckets, groups

type ClusterSpec

type ClusterSpec struct {
	Id   string
	Name string
	Team string
}

type ClusterUnlinker

type ClusterUnlinker interface {
	Unlinker
	// contains filtered or unexported methods
}

type Configurator

type Configurator interface {
	// contains filtered or unexported methods
}

type Error

type Error struct {
	Action string `json:",omitempty"`
}

type Fault

type Fault struct {
	Id     uuid.UUID
	Name   string
	Type   string
	State  string
	Parent FaultReceiver `json:"-"`
	Errors []error
	Action chan *Action `json:"-"`
	Error  chan *Error  `json:"-"`
}

func (*Fault) Attach

func (tef *Fault) Attach(a AttachRequest)

Interface: Attacher

func (*Fault) ClearLoadInfo

func (tef *Fault) ClearLoadInfo()

func (Fault) CloneRepository

func (tef Fault) CloneRepository() RepositoryAttacher

func (*Fault) ComputeCheckInstances

func (tef *Fault) ComputeCheckInstances()

func (*Fault) DeleteCheck

func (tef *Fault) DeleteCheck(c Check)

func (*Fault) DeleteProperty

func (tef *Fault) DeleteProperty(p Property)

func (*Fault) Destroy

func (tef *Fault) Destroy()

func (*Fault) Detach

func (tef *Fault) Detach()

func (*Fault) GetBucket

func (tef *Fault) GetBucket() Receiver

Interface: Bucketeer

func (*Fault) GetEnvironment

func (tef *Fault) GetEnvironment() string

func (*Fault) GetID

func (tef *Fault) GetID() string

Interface: Builder

func (*Fault) GetName

func (tef *Fault) GetName() string

func (*Fault) GetType

func (tef *Fault) GetType() string

func (*Fault) LoadInstance

func (tef *Fault) LoadInstance(i CheckInstance)

func (*Fault) ReAttach

func (tef *Fault) ReAttach(a AttachRequest)

func (*Fault) Receive

func (tef *Fault) Receive(r ReceiveRequest)

Interface: Receiver

func (*Fault) SetCheck

func (tef *Fault) SetCheck(c Check)

Interface: Checker

func (*Fault) SetProperty

func (tef *Fault) SetProperty(p Property)
func (tef *Fault) Unlink(u UnlinkRequest)

Interface: Unlinker

func (*Fault) UpdateProperty

func (tef *Fault) UpdateProperty(p Property)

type FaultReceiver

type FaultReceiver interface {
	Receiver
	FaultUnlinker
	// contains filtered or unexported methods
}

type FaultUnlinker

type FaultUnlinker interface {
	Unlinker
	// contains filtered or unexported methods
}

type FindRequest

type FindRequest struct {
	ElementId   string
	ElementName string
	ElementType string
}

type Finder

type Finder interface {
	Find(f FindRequest, b bool) Attacher
}

type Group

type Group struct {
	Id              uuid.UUID
	Name            string
	State           string
	Team            uuid.UUID
	Type            string
	Parent          GroupReceiver `json:"-"`
	Fault           *Fault        `json:"-"`
	Action          chan *Action  `json:"-"`
	PropertyOncall  map[string]Property
	PropertyService map[string]Property
	PropertySystem  map[string]Property
	PropertyCustom  map[string]Property
	Checks          map[string]Check
	CheckInstances  map[string][]string
	Instances       map[string]CheckInstance
	Children        map[string]GroupAttacher `json:"-"`
	// contains filtered or unexported fields
}

func NewGroup

func NewGroup(spec GroupSpec) *Group

NEW

func (*Group) Attach

func (teg *Group) Attach(a AttachRequest)

Interface: Attacher

func (*Group) ClearLoadInfo

func (teg *Group) ClearLoadInfo()

func (Group) Clone

func (teg Group) Clone() *Group

func (Group) CloneBucket

func (teg Group) CloneBucket() BucketAttacher

func (Group) CloneGroup

func (teg Group) CloneGroup() GroupAttacher

func (*Group) ComputeCheckInstances

func (teg *Group) ComputeCheckInstances()

func (*Group) DeleteCheck

func (teg *Group) DeleteCheck(c Check)

func (*Group) DeleteProperty

func (teg *Group) DeleteProperty(p Property)

func (*Group) Destroy

func (teg *Group) Destroy()

func (*Group) Detach

func (teg *Group) Detach()

func (*Group) Find

func (teg *Group) Find(f FindRequest, b bool) Attacher

Interface: Finder

func (*Group) GetBucket

func (teg *Group) GetBucket() Receiver

Interface: Bucketeer

func (*Group) GetEnvironment

func (teg *Group) GetEnvironment() string

func (*Group) GetID

func (teg *Group) GetID() string

Interface: Builder

func (*Group) GetName

func (teg *Group) GetName() string

func (*Group) GetRepository

func (teg *Group) GetRepository() string

func (*Group) GetRepositoryName

func (teg *Group) GetRepositoryName() string

func (*Group) GetType

func (teg *Group) GetType() string

func (*Group) LoadInstance

func (teg *Group) LoadInstance(i CheckInstance)

func (*Group) ReAttach

func (teg *Group) ReAttach(a AttachRequest)

func (*Group) Receive

func (teg *Group) Receive(r ReceiveRequest)

Interface: Receiver

func (*Group) SetCheck

func (teg *Group) SetCheck(c Check)

func (*Group) SetProperty

func (teg *Group) SetProperty(p Property)
func (teg *Group) Unlink(u UnlinkRequest)

Interface: Unlinker

func (*Group) UpdateProperty

func (teg *Group) UpdateProperty(p Property)

type GroupAttacher

type GroupAttacher interface {
	Attacher

	CloneGroup() GroupAttacher
	ReAttach(a AttachRequest)
	// contains filtered or unexported methods
}

implemented by: groups, clusters, nodes

type GroupReceiver

type GroupReceiver interface {
	Receiver
	GroupUnlinker
	// contains filtered or unexported methods
}

implemented by: buckets, groups

type GroupSpec

type GroupSpec struct {
	Id   string
	Name string
	Team string
}

type GroupUnlinker

type GroupUnlinker interface {
	Unlinker
	// contains filtered or unexported methods
}

type Node

type Node struct {
	Id              uuid.UUID
	Name            string
	AssetId         uint64
	Team            uuid.UUID
	ServerId        uuid.UUID
	State           string
	Online          bool
	Deleted         bool
	Type            string
	Parent          NodeReceiver `json:"-"`
	Fault           *Fault       `json:"-"`
	Action          chan *Action `json:"-"`
	PropertyOncall  map[string]Property
	PropertyService map[string]Property
	PropertySystem  map[string]Property
	PropertyCustom  map[string]Property
	Checks          map[string]Check
	CheckInstances  map[string][]string
	Instances       map[string]CheckInstance
	// contains filtered or unexported fields
}

func NewNode

func NewNode(spec NodeSpec) *Node

NEW

func (*Node) Attach

func (ten *Node) Attach(a AttachRequest)

Interface: Attacher

func (*Node) ClearLoadInfo

func (ten *Node) ClearLoadInfo()

func (Node) Clone

func (ten Node) Clone() *Node

func (Node) CloneBucket

func (ten Node) CloneBucket() BucketAttacher

func (Node) CloneCluster

func (ten Node) CloneCluster() ClusterAttacher

func (Node) CloneGroup

func (ten Node) CloneGroup() GroupAttacher

func (*Node) ComputeCheckInstances

func (ten *Node) ComputeCheckInstances()

func (*Node) DeleteCheck

func (ten *Node) DeleteCheck(c Check)

func (*Node) DeleteProperty

func (ten *Node) DeleteProperty(p Property)

func (*Node) Destroy

func (ten *Node) Destroy()

func (*Node) Detach

func (ten *Node) Detach()

func (*Node) Find

func (ten *Node) Find(f FindRequest, b bool) Attacher

Interface: Finder

func (*Node) GetID

func (ten *Node) GetID() string

Interface:

func (*Node) GetName

func (ten *Node) GetName() string

func (*Node) GetType

func (ten *Node) GetType() string

func (*Node) LoadInstance

func (ten *Node) LoadInstance(i CheckInstance)

func (*Node) ReAttach

func (ten *Node) ReAttach(a AttachRequest)

func (*Node) SetCheck

func (ten *Node) SetCheck(c Check)

func (*Node) SetProperty

func (ten *Node) SetProperty(p Property)

func (*Node) UpdateProperty

func (ten *Node) UpdateProperty(p Property)

type NodeReceiver

type NodeReceiver interface {
	Receiver
	NodeUnlinker
	// contains filtered or unexported methods
}

implemented by: buckets, groups, clusters

type NodeSpec

type NodeSpec struct {
	Id       string
	AssetId  uint64
	Name     string
	Team     string
	ServerId string
	Online   bool
	Deleted  bool
}

type NodeUnlinker

type NodeUnlinker interface {
	Unlinker
	// contains filtered or unexported methods
}

type Propertier

type Propertier interface {
	SetProperty(p Property)

	UpdateProperty(p Property)

	DeleteProperty(p Property)
	// contains filtered or unexported methods
}

type Property

type Property interface {
	GetID() string
	GetInstanceId(objType string, objId uuid.UUID) uuid.UUID
	GetIsInherited() bool
	GetKey() string
	GetSource() string
	GetSourceInstance() string
	GetSourceType() string
	GetType() string
	GetValue() string
	GetView() string

	SetId(id uuid.UUID)
	SetInherited(inherited bool)
	SetInheritedFrom(id uuid.UUID)
	SetSourceId(id uuid.UUID)
	SetSourceType(s string)

	Clone() Property
	Equal(id uuid.UUID) bool
	MakeAction() Action
	// contains filtered or unexported methods
}

type PropertyCustom

type PropertyCustom struct {
	// Id of the custom property
	Id uuid.UUID
	// Id of the source custom property this was inherited from
	SourceId uuid.UUID
	// ObjectType the source property was attached to
	SourceType string
	// Id of the custom property type
	CustomId uuid.UUID
	// Indicator if this was inherited
	Inherited bool
	// Id of the object the SourceId property is on
	InheritedFrom uuid.UUID
	// Inheritance is enabled/disabled
	Inheritance bool
	// ChildrenOnly is enabled/disabled
	ChildrenOnly bool
	// View this property is attached in
	View string
	// Property Key
	Key string
	// Property Value
	Value string
	// Filled with IDs during from-DB load to restore with same IDs
	Instances []PropertyInstance
}

Custom

func (PropertyCustom) Clone

func (p PropertyCustom) Clone() Property

func (*PropertyCustom) Equal

func (p *PropertyCustom) Equal(id uuid.UUID) bool

func (*PropertyCustom) GetID

func (p *PropertyCustom) GetID() string

func (*PropertyCustom) GetInstanceId

func (p *PropertyCustom) GetInstanceId(objType string, objId uuid.UUID) uuid.UUID

func (*PropertyCustom) GetIsInherited

func (p *PropertyCustom) GetIsInherited() bool

func (*PropertyCustom) GetKey

func (p *PropertyCustom) GetKey() string

func (*PropertyCustom) GetKeyField

func (p *PropertyCustom) GetKeyField() string

func (*PropertyCustom) GetSource

func (p *PropertyCustom) GetSource() string

func (*PropertyCustom) GetSourceInstance

func (p *PropertyCustom) GetSourceInstance() string

func (*PropertyCustom) GetSourceType

func (p *PropertyCustom) GetSourceType() string

func (*PropertyCustom) GetType

func (p *PropertyCustom) GetType() string

func (*PropertyCustom) GetValue

func (p *PropertyCustom) GetValue() string

func (*PropertyCustom) GetValueField

func (p *PropertyCustom) GetValueField() string

func (*PropertyCustom) GetView

func (p *PropertyCustom) GetView() string

func (*PropertyCustom) MakeAction

func (p *PropertyCustom) MakeAction() Action

func (*PropertyCustom) SetId

func (p *PropertyCustom) SetId(id uuid.UUID)

func (*PropertyCustom) SetInherited

func (p *PropertyCustom) SetInherited(inherited bool)

func (*PropertyCustom) SetInheritedFrom

func (p *PropertyCustom) SetInheritedFrom(id uuid.UUID)

func (*PropertyCustom) SetSourceId

func (p *PropertyCustom) SetSourceId(id uuid.UUID)

func (*PropertyCustom) SetSourceType

func (p *PropertyCustom) SetSourceType(s string)

type PropertyInstance

type PropertyInstance struct {
	ObjectId   uuid.UUID
	ObjectType string
	InstanceId uuid.UUID
}

type PropertyOncall

type PropertyOncall struct {
	Id            uuid.UUID
	SourceId      uuid.UUID
	SourceType    string
	OncallId      uuid.UUID
	Inherited     bool
	InheritedFrom uuid.UUID
	Inheritance   bool
	ChildrenOnly  bool
	View          string
	Name          string
	Number        string
	Instances     []PropertyInstance
}

Oncall

func (PropertyOncall) Clone

func (p PropertyOncall) Clone() Property

func (*PropertyOncall) Equal

func (p *PropertyOncall) Equal(id uuid.UUID) bool

func (*PropertyOncall) GetID

func (p *PropertyOncall) GetID() string

func (*PropertyOncall) GetInstanceId

func (p *PropertyOncall) GetInstanceId(objType string, objId uuid.UUID) uuid.UUID

func (*PropertyOncall) GetIsInherited

func (p *PropertyOncall) GetIsInherited() bool

func (*PropertyOncall) GetKey

func (p *PropertyOncall) GetKey() string

func (*PropertyOncall) GetName

func (p *PropertyOncall) GetName() string

func (*PropertyOncall) GetNumber

func (p *PropertyOncall) GetNumber() string

func (*PropertyOncall) GetSource

func (p *PropertyOncall) GetSource() string

func (*PropertyOncall) GetSourceInstance

func (p *PropertyOncall) GetSourceInstance() string

func (*PropertyOncall) GetSourceType

func (p *PropertyOncall) GetSourceType() string

func (*PropertyOncall) GetType

func (p *PropertyOncall) GetType() string

func (*PropertyOncall) GetValue

func (p *PropertyOncall) GetValue() string

func (*PropertyOncall) GetView

func (p *PropertyOncall) GetView() string

func (*PropertyOncall) MakeAction

func (p *PropertyOncall) MakeAction() Action

func (*PropertyOncall) SetId

func (p *PropertyOncall) SetId(id uuid.UUID)

func (*PropertyOncall) SetInherited

func (p *PropertyOncall) SetInherited(inherited bool)

func (*PropertyOncall) SetInheritedFrom

func (p *PropertyOncall) SetInheritedFrom(id uuid.UUID)

func (*PropertyOncall) SetSourceId

func (p *PropertyOncall) SetSourceId(id uuid.UUID)

func (*PropertyOncall) SetSourceType

func (p *PropertyOncall) SetSourceType(s string)

type PropertyService

type PropertyService struct {
	Id            uuid.UUID
	SourceId      uuid.UUID
	SourceType    string
	Inherited     bool
	InheritedFrom uuid.UUID
	Inheritance   bool
	ChildrenOnly  bool
	View          string
	Service       string
	Attributes    []proto.ServiceAttribute
	Instances     []PropertyInstance
}

Service

func (PropertyService) Clone

func (p PropertyService) Clone() Property

func (*PropertyService) Equal

func (p *PropertyService) Equal(id uuid.UUID) bool

func (*PropertyService) GetID

func (p *PropertyService) GetID() string

func (*PropertyService) GetInstanceId

func (p *PropertyService) GetInstanceId(objType string, objId uuid.UUID) uuid.UUID

func (*PropertyService) GetIsInherited

func (p *PropertyService) GetIsInherited() bool

func (*PropertyService) GetKey

func (p *PropertyService) GetKey() string

func (*PropertyService) GetSource

func (p *PropertyService) GetSource() string

func (*PropertyService) GetSourceInstance

func (p *PropertyService) GetSourceInstance() string

func (*PropertyService) GetSourceType

func (p *PropertyService) GetSourceType() string

func (*PropertyService) GetType

func (p *PropertyService) GetType() string

func (*PropertyService) GetValue

func (p *PropertyService) GetValue() string

service has no Value per se, so ensure comparing values never succeeds, but Interface is fulfilled

func (*PropertyService) GetView

func (p *PropertyService) GetView() string

func (*PropertyService) MakeAction

func (p *PropertyService) MakeAction() Action

func (*PropertyService) SetId

func (p *PropertyService) SetId(id uuid.UUID)

func (*PropertyService) SetInherited

func (p *PropertyService) SetInherited(inherited bool)

func (*PropertyService) SetInheritedFrom

func (p *PropertyService) SetInheritedFrom(id uuid.UUID)

func (*PropertyService) SetSourceId

func (p *PropertyService) SetSourceId(id uuid.UUID)

func (*PropertyService) SetSourceType

func (p *PropertyService) SetSourceType(s string)

type PropertySystem

type PropertySystem struct {
	Id            uuid.UUID
	SourceId      uuid.UUID
	SourceType    string
	Inherited     bool
	InheritedFrom uuid.UUID
	Inheritance   bool
	ChildrenOnly  bool
	View          string
	Key           string
	Value         string
	Instances     []PropertyInstance
}

System

func (PropertySystem) Clone

func (p PropertySystem) Clone() Property

func (*PropertySystem) Equal

func (p *PropertySystem) Equal(id uuid.UUID) bool

func (*PropertySystem) GetID

func (p *PropertySystem) GetID() string

func (*PropertySystem) GetInstanceId

func (p *PropertySystem) GetInstanceId(objType string, objId uuid.UUID) uuid.UUID

func (*PropertySystem) GetIsInherited

func (p *PropertySystem) GetIsInherited() bool

func (*PropertySystem) GetKey

func (p *PropertySystem) GetKey() string

func (*PropertySystem) GetSource

func (p *PropertySystem) GetSource() string

func (*PropertySystem) GetSourceInstance

func (p *PropertySystem) GetSourceInstance() string

func (*PropertySystem) GetSourceType

func (p *PropertySystem) GetSourceType() string

func (*PropertySystem) GetType

func (p *PropertySystem) GetType() string

func (*PropertySystem) GetValue

func (p *PropertySystem) GetValue() string

func (*PropertySystem) GetView

func (p *PropertySystem) GetView() string

func (*PropertySystem) MakeAction

func (p *PropertySystem) MakeAction() Action

func (*PropertySystem) SetId

func (p *PropertySystem) SetId(id uuid.UUID)

func (*PropertySystem) SetInherited

func (p *PropertySystem) SetInherited(inherited bool)

func (*PropertySystem) SetInheritedFrom

func (p *PropertySystem) SetInheritedFrom(id uuid.UUID)

func (*PropertySystem) SetSourceId

func (p *PropertySystem) SetSourceId(id uuid.UUID)

func (*PropertySystem) SetSourceType

func (p *PropertySystem) SetSourceType(s string)

type ReceiveRequest

type ReceiveRequest struct {
	ParentType string
	ParentId   string
	ParentName string
	ChildType  string
	Repository *Repository
	Bucket     *Bucket
	Group      *Group
	Cluster    *Cluster
	Node       *Node
	Fault      *Fault
}

type Receiver

type Receiver interface {
	Receive(r ReceiveRequest)
}

type Repository

type Repository struct {
	Id              uuid.UUID
	Name            string
	Team            uuid.UUID
	Deleted         bool
	Active          bool
	Type            string
	State           string
	Parent          RepositoryReceiver `json:"-"`
	Fault           *Fault             `json:"-"`
	PropertyOncall  map[string]Property
	PropertyService map[string]Property
	PropertySystem  map[string]Property
	PropertyCustom  map[string]Property
	Checks          map[string]Check
	Children        map[string]RepositoryAttacher // `json:"-"`
	Action          chan *Action                  `json:"-"`
}

func NewRepository

func NewRepository(spec RepositorySpec) *Repository

NEW

func (*Repository) Attach

func (ter *Repository) Attach(a AttachRequest)

Interface: Attacher

func (*Repository) ClearLoadInfo

func (ter *Repository) ClearLoadInfo()

func (Repository) Clone

func (ter Repository) Clone() Repository

func (*Repository) ComputeCheckInstances

func (ter *Repository) ComputeCheckInstances()

func (*Repository) DeleteCheck

func (ter *Repository) DeleteCheck(c Check)

func (*Repository) DeleteProperty

func (ter *Repository) DeleteProperty(p Property)

func (*Repository) Destroy

func (ter *Repository) Destroy()

func (*Repository) Detach

func (ter *Repository) Detach()

func (*Repository) Find

func (ter *Repository) Find(f FindRequest, b bool) Attacher

Interface: Finder

func (*Repository) GetID

func (ter *Repository) GetID() string

Interface: Builder

func (*Repository) GetName

func (ter *Repository) GetName() string

func (*Repository) GetType

func (ter *Repository) GetType() string

func (*Repository) LoadInstance

func (ter *Repository) LoadInstance(i CheckInstance)

XXX

func (*Repository) Receive

func (ter *Repository) Receive(r ReceiveRequest)

Interface: Receiver

func (*Repository) SetCheck

func (ter *Repository) SetCheck(c Check)

Checker:> Add Check

func (*Repository) SetProperty

func (ter *Repository) SetProperty(p Property)
func (ter *Repository) Unlink(u UnlinkRequest)

Interface: Unlinker

func (*Repository) UpdateProperty

func (ter *Repository) UpdateProperty(p Property)

type RepositoryAttacher

type RepositoryAttacher interface {
	Attacher

	CloneRepository() RepositoryAttacher
	// contains filtered or unexported methods
}

implemented by: buckets

type RepositoryReceiver

type RepositoryReceiver interface {
	Receiver
	RepositoryUnlinker
	// contains filtered or unexported methods
}

implemented by: root

type RepositorySpec

type RepositorySpec struct {
	Id      string
	Name    string
	Team    string
	Deleted bool
	Active  bool
}

type RepositoryUnlinker

type RepositoryUnlinker interface {
	Unlinker
	// contains filtered or unexported methods
}

type RootAttacher

type RootAttacher interface {
	Attacher
	// contains filtered or unexported methods
}

implemented by: repository

type Tree

type Tree struct {
	Id     uuid.UUID
	Name   string
	Type   string
	Child  *Repository
	Snap   *Repository
	Action chan *Action `json:"-"`
}

func New

func New(spec TreeSpec) *Tree

func (*Tree) AttachError

func (st *Tree) AttachError(err Error)

func (*Tree) Begin

func (st *Tree) Begin()

func (*Tree) ClearLoadInfo

func (st *Tree) ClearLoadInfo()

func (*Tree) Commit

func (st *Tree) Commit()

func (*Tree) ComputeCheckInstances

func (st *Tree) ComputeCheckInstances()

func (*Tree) Find

func (st *Tree) Find(f FindRequest, b bool) Attacher

Interface: Finder

func (*Tree) GetErrors

func (st *Tree) GetErrors() []error

func (*Tree) GetID

func (st *Tree) GetID() string

Interface: Builder

func (*Tree) GetName

func (st *Tree) GetName() string

func (*Tree) GetType

func (st *Tree) GetType() string

func (*Tree) Receive

func (st *Tree) Receive(r ReceiveRequest)

Interface: Receiver

func (*Tree) Rollback

func (st *Tree) Rollback()

func (*Tree) SetError

func (st *Tree) SetError(c chan *Error)
func (st *Tree) Unlink(u UnlinkRequest)

Interface: Unlinker

type TreeSpec

type TreeSpec struct {
	Id     string
	Name   string
	Action chan *Action
}

type UnlinkRequest

type UnlinkRequest struct {
	ParentType string
	ParentId   string
	ParentName string
	ChildType  string
	ChildName  string
	ChildId    string
}

type Unlinker

type Unlinker interface {
	Unlink(u UnlinkRequest)
}

Jump to

Keyboard shortcuts

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