agentpb

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2020 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthAcl = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAcl   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthCommon = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCommon   = fmt.Errorf("proto: integer overflow")
)

Functions

This section is empty.

Types

type ACLLink struct {
	ID   string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty" hash:"ignore"`
}

func (*ACLLink) Descriptor

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

func (*ACLLink) Marshal

func (m *ACLLink) Marshal() (dAtA []byte, err error)

func (*ACLLink) MarshalBinary

func (msg *ACLLink) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*ACLLink) MarshalTo

func (m *ACLLink) MarshalTo(dAtA []byte) (int, error)

func (*ACLLink) ProtoMessage

func (*ACLLink) ProtoMessage()

func (*ACLLink) Reset

func (m *ACLLink) Reset()

func (*ACLLink) Size

func (m *ACLLink) Size() (n int)

func (*ACLLink) String

func (m *ACLLink) String() string

func (*ACLLink) Unmarshal

func (m *ACLLink) Unmarshal(dAtA []byte) error

func (*ACLLink) UnmarshalBinary

func (msg *ACLLink) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*ACLLink) XXX_DiscardUnknown

func (m *ACLLink) XXX_DiscardUnknown()

func (*ACLLink) XXX_Marshal

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

func (*ACLLink) XXX_Merge

func (m *ACLLink) XXX_Merge(src proto.Message)

func (*ACLLink) XXX_Size

func (m *ACLLink) XXX_Size() int

func (*ACLLink) XXX_Unmarshal

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

type QueryMeta

type QueryMeta struct {
	// This is the index associated with the read
	Index uint64 `protobuf:"varint,1,opt,name=Index,proto3" json:"Index,omitempty"`
	// If AllowStale is used, this is time elapsed since
	// last contact between the follower and leader. This
	// can be used to gauge staleness.
	LastContact time.Duration `protobuf:"bytes,2,opt,name=LastContact,proto3,stdduration" json:"LastContact"`
	// Used to indicate if there is a known leader node
	KnownLeader bool `protobuf:"varint,3,opt,name=KnownLeader,proto3" json:"KnownLeader,omitempty"`
	// Consistencylevel returns the consistency used to serve the query
	// Having `discovery_max_stale` on the agent can affect whether
	// the request was served by a leader.
	ConsistencyLevel string `protobuf:"bytes,4,opt,name=ConsistencyLevel,proto3" json:"ConsistencyLevel,omitempty"`
}

QueryMeta allows a query response to include potentially useful metadata about a query

func (*QueryMeta) Descriptor

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

func (*QueryMeta) GetConsistencyLevel

func (m *QueryMeta) GetConsistencyLevel() string

func (*QueryMeta) GetIndex

func (m *QueryMeta) GetIndex() uint64

func (*QueryMeta) GetKnownLeader

func (m *QueryMeta) GetKnownLeader() bool

func (*QueryMeta) GetLastContact

func (m *QueryMeta) GetLastContact() time.Duration

func (*QueryMeta) Marshal

func (m *QueryMeta) Marshal() (dAtA []byte, err error)

func (*QueryMeta) MarshalBinary

func (msg *QueryMeta) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*QueryMeta) MarshalTo

func (m *QueryMeta) MarshalTo(dAtA []byte) (int, error)

func (*QueryMeta) ProtoMessage

func (*QueryMeta) ProtoMessage()

func (*QueryMeta) Reset

func (m *QueryMeta) Reset()

func (*QueryMeta) SetConsistencyLevel

func (q *QueryMeta) SetConsistencyLevel(consistencyLevel string)

SetConsistencyLevel is needed to implement the structs.QueryMetaCompat interface

func (*QueryMeta) SetIndex

func (q *QueryMeta) SetIndex(index uint64)

SetIndex is needed to implement the structs.QueryMetaCompat interface

func (*QueryMeta) SetKnownLeader

func (q *QueryMeta) SetKnownLeader(knownLeader bool)

SetKnownLeader is needed to implement the structs.QueryMetaCompat interface

func (*QueryMeta) SetLastContact

func (q *QueryMeta) SetLastContact(lastContact time.Duration)

SetLastContact is needed to implement the structs.QueryMetaCompat interface

func (*QueryMeta) Size

func (m *QueryMeta) Size() (n int)

func (*QueryMeta) String

func (m *QueryMeta) String() string

func (*QueryMeta) Unmarshal

func (m *QueryMeta) Unmarshal(dAtA []byte) error

func (*QueryMeta) UnmarshalBinary

func (msg *QueryMeta) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*QueryMeta) XXX_DiscardUnknown

func (m *QueryMeta) XXX_DiscardUnknown()

func (*QueryMeta) XXX_Marshal

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

func (*QueryMeta) XXX_Merge

func (m *QueryMeta) XXX_Merge(src proto.Message)

func (*QueryMeta) XXX_Size

func (m *QueryMeta) XXX_Size() int

func (*QueryMeta) XXX_Unmarshal

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

type QueryOptions

type QueryOptions struct {
	// Token is the ACL token ID. If not provided, the 'anonymous'
	// token is assumed for backwards compatibility.
	Token string `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty"`
	// If set, wait until query exceeds given index. Must be provided
	// with MaxQueryTime.
	MinQueryIndex uint64 `protobuf:"varint,2,opt,name=MinQueryIndex,proto3" json:"MinQueryIndex,omitempty"`
	// Provided with MinQueryIndex to wait for change.
	MaxQueryTime time.Duration `protobuf:"bytes,3,opt,name=MaxQueryTime,proto3,stdduration" json:"MaxQueryTime"`
	// If set, any follower can service the request. Results
	// may be arbitrarily stale.
	AllowStale bool `protobuf:"varint,4,opt,name=AllowStale,proto3" json:"AllowStale,omitempty"`
	// If set, the leader must verify leadership prior to
	// servicing the request. Prevents a stale read.
	RequireConsistent bool `protobuf:"varint,5,opt,name=RequireConsistent,proto3" json:"RequireConsistent,omitempty"`
	// If set, the local agent may respond with an arbitrarily stale locally
	// cached response. The semantics differ from AllowStale since the agent may
	// be entirely partitioned from the servers and still considered "healthy" by
	// operators. Stale responses from Servers are also arbitrarily stale, but can
	// provide additional bounds on the last contact time from the leader. It's
	// expected that servers that are partitioned are noticed and replaced in a
	// timely way by operators while the same may not be true for client agents.
	UseCache bool `protobuf:"varint,6,opt,name=UseCache,proto3" json:"UseCache,omitempty"`
	// If set and AllowStale is true, will try first a stale
	// read, and then will perform a consistent read if stale
	// read is older than value.
	MaxStaleDuration time.Duration `protobuf:"bytes,7,opt,name=MaxStaleDuration,proto3,stdduration" json:"MaxStaleDuration"`
	// MaxAge limits how old a cached value will be returned if UseCache is true.
	// If there is a cached response that is older than the MaxAge, it is treated
	// as a cache miss and a new fetch invoked. If the fetch fails, the error is
	// returned. Clients that wish to allow for stale results on error can set
	// StaleIfError to a longer duration to change this behavior. It is ignored
	// if the endpoint supports background refresh caching. See
	// https://www.consul.io/api/index.html#agent-caching for more details.
	MaxAge time.Duration `protobuf:"bytes,8,opt,name=MaxAge,proto3,stdduration" json:"MaxAge"`
	// MustRevalidate forces the agent to fetch a fresh version of a cached
	// resource or at least validate that the cached version is still fresh. It is
	// implied by either max-age=0 or must-revalidate Cache-Control headers. It
	// only makes sense when UseCache is true. We store it since MaxAge = 0 is the
	// default unset value.
	MustRevalidate bool `protobuf:"varint,9,opt,name=MustRevalidate,proto3" json:"MustRevalidate,omitempty"`
	// StaleIfError specifies how stale the client will accept a cached response
	// if the servers are unavailable to fetch a fresh one. Only makes sense when
	// UseCache is true and MaxAge is set to a lower, non-zero value. It is
	// ignored if the endpoint supports background refresh caching. See
	// https://www.consul.io/api/index.html#agent-caching for more details.
	StaleIfError time.Duration `protobuf:"bytes,10,opt,name=StaleIfError,proto3,stdduration" json:"StaleIfError"`
	// Filter specifies the go-bexpr filter expression to be used for
	// filtering the data prior to returning a response
	Filter string `protobuf:"bytes,11,opt,name=Filter,proto3" json:"Filter,omitempty"`
}

QueryOptions is used to specify various flags for read queries

func (*QueryOptions) AllowStaleRead

func (q *QueryOptions) AllowStaleRead() bool

AllowStaleRead returns whether a stale read should be allowed

func (*QueryOptions) Descriptor

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

func (*QueryOptions) GetAllowStale

func (m *QueryOptions) GetAllowStale() bool

func (*QueryOptions) GetFilter

func (m *QueryOptions) GetFilter() string

func (*QueryOptions) GetMaxAge

func (m *QueryOptions) GetMaxAge() time.Duration

func (*QueryOptions) GetMaxQueryTime

func (m *QueryOptions) GetMaxQueryTime() time.Duration

func (*QueryOptions) GetMaxStaleDuration

func (m *QueryOptions) GetMaxStaleDuration() time.Duration

func (*QueryOptions) GetMinQueryIndex

func (m *QueryOptions) GetMinQueryIndex() uint64

func (*QueryOptions) GetMustRevalidate

func (m *QueryOptions) GetMustRevalidate() bool

func (*QueryOptions) GetRequireConsistent

func (m *QueryOptions) GetRequireConsistent() bool

func (*QueryOptions) GetStaleIfError

func (m *QueryOptions) GetStaleIfError() time.Duration

func (*QueryOptions) GetToken

func (m *QueryOptions) GetToken() string

func (*QueryOptions) GetUseCache

func (m *QueryOptions) GetUseCache() bool

func (*QueryOptions) IsRead

func (q *QueryOptions) IsRead() bool

IsRead is always true for QueryOption

func (*QueryOptions) Marshal

func (m *QueryOptions) Marshal() (dAtA []byte, err error)

func (*QueryOptions) MarshalBinary

func (msg *QueryOptions) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*QueryOptions) MarshalTo

func (m *QueryOptions) MarshalTo(dAtA []byte) (int, error)

func (*QueryOptions) ProtoMessage

func (*QueryOptions) ProtoMessage()

func (*QueryOptions) Reset

func (m *QueryOptions) Reset()

func (*QueryOptions) SetAllowStale

func (q *QueryOptions) SetAllowStale(allowStale bool)

SetAllowStale is needed to implement the structs.QueryOptionsCompat interface

func (*QueryOptions) SetFilter

func (q *QueryOptions) SetFilter(filter string)

SetFilter is needed to implement the structs.QueryOptionsCompat interface

func (*QueryOptions) SetMaxAge

func (q *QueryOptions) SetMaxAge(maxAge time.Duration)

SetMaxAge is needed to implement the structs.QueryOptionsCompat interface

func (*QueryOptions) SetMaxQueryTime

func (q *QueryOptions) SetMaxQueryTime(maxQueryTime time.Duration)

SetMaxQueryTime is needed to implement the structs.QueryOptionsCompat interface

func (*QueryOptions) SetMaxStaleDuration

func (q *QueryOptions) SetMaxStaleDuration(maxStaleDuration time.Duration)

SetMaxStaleDuration is needed to implement the structs.QueryOptionsCompat interface

func (*QueryOptions) SetMinQueryIndex

func (q *QueryOptions) SetMinQueryIndex(minQueryIndex uint64)

SetMinQueryIndex is needed to implement the structs.QueryOptionsCompat interface

func (*QueryOptions) SetMustRevalidate

func (q *QueryOptions) SetMustRevalidate(mustRevalidate bool)

SetMustRevalidate is needed to implement the structs.QueryOptionsCompat interface

func (*QueryOptions) SetRequireConsistent

func (q *QueryOptions) SetRequireConsistent(requireConsistent bool)

SetRequireConsistent is needed to implement the structs.QueryOptionsCompat interface

func (*QueryOptions) SetStaleIfError

func (q *QueryOptions) SetStaleIfError(staleIfError time.Duration)

SetStaleIfError is needed to implement the structs.QueryOptionsCompat interface

func (*QueryOptions) SetToken

func (q *QueryOptions) SetToken(token string)

SetToken is needed to implement the structs.QueryOptionsCompat interface

func (*QueryOptions) SetUseCache

func (q *QueryOptions) SetUseCache(useCache bool)

SetUseCache is needed to implement the structs.QueryOptionsCompat interface

func (*QueryOptions) Size

func (m *QueryOptions) Size() (n int)

func (*QueryOptions) String

func (m *QueryOptions) String() string

func (*QueryOptions) TokenSecret

func (q *QueryOptions) TokenSecret() string

func (*QueryOptions) Unmarshal

func (m *QueryOptions) Unmarshal(dAtA []byte) error

func (*QueryOptions) UnmarshalBinary

func (msg *QueryOptions) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*QueryOptions) XXX_DiscardUnknown

func (m *QueryOptions) XXX_DiscardUnknown()

func (*QueryOptions) XXX_Marshal

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

func (*QueryOptions) XXX_Merge

func (m *QueryOptions) XXX_Merge(src proto.Message)

func (*QueryOptions) XXX_Size

func (m *QueryOptions) XXX_Size() int

func (*QueryOptions) XXX_Unmarshal

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

type RaftIndex

type RaftIndex struct {
	CreateIndex uint64 `protobuf:"varint,1,opt,name=CreateIndex,proto3" json:"CreateIndex,omitempty" bexpr:"-"`
	ModifyIndex uint64 `protobuf:"varint,2,opt,name=ModifyIndex,proto3" json:"ModifyIndex,omitempty" bexpr:"-"`
}

RaftIndex is used to track the index used while creating or modifying a given struct type.

func (*RaftIndex) Descriptor

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

func (*RaftIndex) Marshal

func (m *RaftIndex) Marshal() (dAtA []byte, err error)

func (*RaftIndex) MarshalBinary

func (msg *RaftIndex) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*RaftIndex) MarshalTo

func (m *RaftIndex) MarshalTo(dAtA []byte) (int, error)

func (*RaftIndex) ProtoMessage

func (*RaftIndex) ProtoMessage()

func (*RaftIndex) Reset

func (m *RaftIndex) Reset()

func (*RaftIndex) Size

func (m *RaftIndex) Size() (n int)

func (*RaftIndex) String

func (m *RaftIndex) String() string

func (*RaftIndex) Unmarshal

func (m *RaftIndex) Unmarshal(dAtA []byte) error

func (*RaftIndex) UnmarshalBinary

func (msg *RaftIndex) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*RaftIndex) XXX_DiscardUnknown

func (m *RaftIndex) XXX_DiscardUnknown()

func (*RaftIndex) XXX_Marshal

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

func (*RaftIndex) XXX_Merge

func (m *RaftIndex) XXX_Merge(src proto.Message)

func (*RaftIndex) XXX_Size

func (m *RaftIndex) XXX_Size() int

func (*RaftIndex) XXX_Unmarshal

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

type TargetDatacenter

type TargetDatacenter struct {
	Datacenter string `protobuf:"bytes,1,opt,name=Datacenter,proto3" json:"Datacenter,omitempty"`
}

TargetDatacenter is intended to be used within other messages used for RPC routing amongst the various Consul datacenters

func (*TargetDatacenter) Descriptor

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

func (*TargetDatacenter) Marshal

func (m *TargetDatacenter) Marshal() (dAtA []byte, err error)

func (*TargetDatacenter) MarshalBinary

func (msg *TargetDatacenter) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*TargetDatacenter) MarshalTo

func (m *TargetDatacenter) MarshalTo(dAtA []byte) (int, error)

func (*TargetDatacenter) ProtoMessage

func (*TargetDatacenter) ProtoMessage()

func (TargetDatacenter) RequestDatacenter

func (td TargetDatacenter) RequestDatacenter() string

func (*TargetDatacenter) Reset

func (m *TargetDatacenter) Reset()

func (*TargetDatacenter) Size

func (m *TargetDatacenter) Size() (n int)

func (*TargetDatacenter) String

func (m *TargetDatacenter) String() string

func (*TargetDatacenter) Unmarshal

func (m *TargetDatacenter) Unmarshal(dAtA []byte) error

func (*TargetDatacenter) UnmarshalBinary

func (msg *TargetDatacenter) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*TargetDatacenter) XXX_DiscardUnknown

func (m *TargetDatacenter) XXX_DiscardUnknown()

func (*TargetDatacenter) XXX_Marshal

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

func (*TargetDatacenter) XXX_Merge

func (m *TargetDatacenter) XXX_Merge(src proto.Message)

func (*TargetDatacenter) XXX_Size

func (m *TargetDatacenter) XXX_Size() int

func (*TargetDatacenter) XXX_Unmarshal

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

type WriteRequest

type WriteRequest struct {
	// Token is the ACL token ID. If not provided, the 'anonymous'
	// token is assumed for backwards compatibility.
	Token string `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty"`
}

func (WriteRequest) AllowStaleRead

func (w WriteRequest) AllowStaleRead() bool

AllowStaleRead returns whether a stale read should be allowed

func (*WriteRequest) Descriptor

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

func (*WriteRequest) GetToken

func (m *WriteRequest) GetToken() string

func (WriteRequest) IsRead

func (w WriteRequest) IsRead() bool

WriteRequest only applies to writes, always false

func (*WriteRequest) Marshal

func (m *WriteRequest) Marshal() (dAtA []byte, err error)

func (*WriteRequest) MarshalBinary

func (msg *WriteRequest) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*WriteRequest) MarshalTo

func (m *WriteRequest) MarshalTo(dAtA []byte) (int, error)

func (*WriteRequest) ProtoMessage

func (*WriteRequest) ProtoMessage()

func (*WriteRequest) Reset

func (m *WriteRequest) Reset()

func (*WriteRequest) Size

func (m *WriteRequest) Size() (n int)

func (*WriteRequest) String

func (m *WriteRequest) String() string

func (WriteRequest) TokenSecret

func (w WriteRequest) TokenSecret() string

func (*WriteRequest) Unmarshal

func (m *WriteRequest) Unmarshal(dAtA []byte) error

func (*WriteRequest) UnmarshalBinary

func (msg *WriteRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*WriteRequest) XXX_DiscardUnknown

func (m *WriteRequest) XXX_DiscardUnknown()

func (*WriteRequest) XXX_Marshal

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

func (*WriteRequest) XXX_Merge

func (m *WriteRequest) XXX_Merge(src proto.Message)

func (*WriteRequest) XXX_Size

func (m *WriteRequest) XXX_Size() int

func (*WriteRequest) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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