proto

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Default_TargetsConf_ExpireMsec int32 = 30000
View Source
const Default_TargetsConf_ReEvalSec int32 = 0

Variables

This section is empty.

Functions

This section is empty.

Types

type TargetsConf

type TargetsConf struct {
	// Config-name to list hosts from.
	Cfg *string `protobuf:"bytes,1,opt,name=cfg" json:"cfg,omitempty"`
	// Expiration time in ms for RTC variables. Variables older will be ignored.
	ExpireMsec *int32 `protobuf:"varint,2,opt,name=expire_msec,json=expireMsec,def=30000" json:"expire_msec,omitempty"`
	// Which address tag to resolve a hostname to. Hosts report multiple addresses
	// for themselves, each with a "tag" (like "PUBLIC_IP" or "PRIVATE_IP"). For
	// more information, see the "tag" field of the RtcTargetInfo.Address message.
	ResolveTag *string `protobuf:"bytes,3,opt,name=resolve_tag,json=resolveTag" json:"resolve_tag,omitempty"`
	// groups is a list of groups that should be included by the lister. Hosts can
	// assign themselves a set "groups" such as "Zone1" or "HasMultiNIC". If this
	// field is set, then we will filter out hosts that don't have a group that
	// matches any groups listed here. If groups is not set, no filtering will
	// occure.
	//
	// For more information, see the "groups" field of the RtcTargetInfo message.
	//
	// Example :
	//   Host1 has group "G1" and "G2"
	//   Host2 has groups "G2" and "G3"
	//   Host3 has no groups.
	//   The following table shows values for groups and which hosts will be
	//   listed.
	//   groups      | Listed Hosts
	//   ------------|--------------------
	//   ["G1"]      | Host1
	//   ["G2"]      | Host1, Host2
	//   ["G1","G3"] | Host1, Host2
	//   ["G4"]      | None
	//   []          | Host1, Host2, Host3
	Groups []string `protobuf:"bytes,4,rep,name=groups" json:"groups,omitempty"`
	// How often targets should be evaluated. Any number less than or equal to 0
	// will result in no target caching (targets will be reevaluated on demand).
	ReEvalSec *int32 `protobuf:"varint,6,opt,name=re_eval_sec,json=reEvalSec,def=0" json:"re_eval_sec,omitempty"`
	// The alphanumeric ID of the project which this instance is member of
	// (not project number)
	// e.g. bbmc-cloudprober-instance-cxkdsa123
	ProjectId            []string `protobuf:"bytes,7,rep,name=project_id,json=projectId" json:"project_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TargetsConf represents listing targets from a key/val set stored in the RTC API under a certain provided configuration. It always only lists the keys (hostnames) and provides a resolver which will resolve to a single tag. This can be used as a kind of drop-in replacement for GCE Instances when that would not be possible. For example, one could set "resolve_tag" to "ip", and this lister will now list all VM names, with a resolver that resolves those names to their ip addresses.

For more information on RTC see https://cloud.google.com/deployment-manager/runtime-configurator/reference/rest/

It is assumed that this is being curated, and indeed can be controlled with settings in a cloudprober configuration. See cloudprober/config/config.proto.

func (*TargetsConf) Descriptor

func (*TargetsConf) Descriptor() ([]byte, []int)

func (*TargetsConf) GetCfg

func (m *TargetsConf) GetCfg() string

func (*TargetsConf) GetExpireMsec

func (m *TargetsConf) GetExpireMsec() int32

func (*TargetsConf) GetGroups

func (m *TargetsConf) GetGroups() []string

func (*TargetsConf) GetProjectId

func (m *TargetsConf) GetProjectId() []string

func (*TargetsConf) GetReEvalSec

func (m *TargetsConf) GetReEvalSec() int32

func (*TargetsConf) GetResolveTag

func (m *TargetsConf) GetResolveTag() string

func (*TargetsConf) ProtoMessage

func (*TargetsConf) ProtoMessage()

func (*TargetsConf) Reset

func (m *TargetsConf) Reset()

func (*TargetsConf) String

func (m *TargetsConf) String() string

func (*TargetsConf) XXX_DiscardUnknown

func (m *TargetsConf) XXX_DiscardUnknown()

func (*TargetsConf) XXX_Marshal

func (m *TargetsConf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TargetsConf) XXX_Merge

func (dst *TargetsConf) XXX_Merge(src proto.Message)

func (*TargetsConf) XXX_Size

func (m *TargetsConf) XXX_Size() int

func (*TargetsConf) XXX_Unmarshal

func (m *TargetsConf) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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