consul

package
v1.12.0-beta28 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: Apache-2.0 Imports: 19 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UpstreamSpec_ConsulConsistencyModes_name = map[int32]string{
		0: "ConsistentMode",
		2: "DefaultMode",
		1: "StaleMode",
	}
	UpstreamSpec_ConsulConsistencyModes_value = map[string]int32{
		"ConsistentMode": 0,
		"DefaultMode":    2,
		"StaleMode":      1,
	}
)

Enum value maps for UpstreamSpec_ConsulConsistencyModes.

View Source
var File_github_com_solo_io_gloo_projects_gloo_api_v1_options_consul_consul_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type UpstreamSpec

type UpstreamSpec struct {

	// The name of the Consul Service
	ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
	// Deprecated: This field was renamed to subset_tags. If subset_tags is used, this field is
	// ignored. Otherwise, the behavior is the same as subset_tags field below.
	ServiceTags []string `protobuf:"bytes,2,rep,name=service_tags,json=serviceTags,proto3" json:"service_tags,omitempty"`
	// Gloo will segment instances based off of these tags. This allows you to set routes that route
	// to a subset of the instances of the service
	SubsetTags []string `protobuf:"bytes,6,rep,name=subset_tags,json=subsetTags,proto3" json:"subset_tags,omitempty"`
	// The list of service tags Gloo should search for on a service instance
	// before deciding whether or not to include the instance as part of this
	// upstream. Empty list means that all service instances with the same service name will be
	// included. When not empty, only service instances that match all of the tags (subset match) will be selected
	// for this upstream.
	InstanceTags []string `protobuf:"bytes,7,rep,name=instance_tags,json=instanceTags,proto3" json:"instance_tags,omitempty"`
	// The opposite of instanceTags, this is a list of service tags that gloo should ensure are not
	// in a service instance before including it in an upstream.
	InstanceBlacklistTags []string `` /* 126-byte string literal not displayed */
	// An optional Service Spec describing the service listening at this address
	ServiceSpec *options.ServiceSpec `protobuf:"bytes,3,opt,name=service_spec,json=serviceSpec,proto3" json:"service_spec,omitempty"`
	// Sets the consistency mode. The default is the ConsistentMode.
	ConsistencyMode UpstreamSpec_ConsulConsistencyModes `` /* 153-byte string literal not displayed */
	// Is this consul service connect enabled.
	ConnectEnabled bool `protobuf:"varint,4,opt,name=connect_enabled,json=connectEnabled,proto3" json:"connect_enabled,omitempty"`
	// The data centers in which the service instance represented by this upstream is registered.
	DataCenters []string `protobuf:"bytes,5,rep,name=data_centers,json=dataCenters,proto3" json:"data_centers,omitempty"`
	// contains filtered or unexported fields
}

Upstream Spec for Consul Upstreams consul Upstreams represent a set of one or more addressable pods for a consul Service the Gloo consul Upstream maps to a single service port. Because consul Services support multiple ports, Gloo requires that a different upstream be created for each port consul Upstreams are typically generated automatically by Gloo from the consul API

func (*UpstreamSpec) Clone added in v1.8.24

func (m *UpstreamSpec) Clone() proto.Message

Clone function

func (*UpstreamSpec) Descriptor deprecated

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

Deprecated: Use UpstreamSpec.ProtoReflect.Descriptor instead.

func (*UpstreamSpec) Equal

func (m *UpstreamSpec) Equal(that interface{}) bool

Equal function

func (*UpstreamSpec) GetConnectEnabled

func (x *UpstreamSpec) GetConnectEnabled() bool

func (*UpstreamSpec) GetConsistencyMode added in v1.9.25

func (x *UpstreamSpec) GetConsistencyMode() UpstreamSpec_ConsulConsistencyModes

func (*UpstreamSpec) GetDataCenters

func (x *UpstreamSpec) GetDataCenters() []string

func (*UpstreamSpec) GetInstanceBlacklistTags added in v1.6.0

func (x *UpstreamSpec) GetInstanceBlacklistTags() []string

func (*UpstreamSpec) GetInstanceTags added in v1.3.13

func (x *UpstreamSpec) GetInstanceTags() []string

func (*UpstreamSpec) GetServiceName

func (x *UpstreamSpec) GetServiceName() string

func (*UpstreamSpec) GetServiceSpec

func (x *UpstreamSpec) GetServiceSpec() *options.ServiceSpec

func (*UpstreamSpec) GetServiceTags

func (x *UpstreamSpec) GetServiceTags() []string

func (*UpstreamSpec) GetSubsetTags added in v1.3.13

func (x *UpstreamSpec) GetSubsetTags() []string

func (*UpstreamSpec) Hash added in v1.2.13

func (m *UpstreamSpec) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*UpstreamSpec) ProtoMessage

func (*UpstreamSpec) ProtoMessage()

func (*UpstreamSpec) ProtoReflect added in v1.6.0

func (x *UpstreamSpec) ProtoReflect() protoreflect.Message

func (*UpstreamSpec) Reset

func (x *UpstreamSpec) Reset()

func (*UpstreamSpec) String

func (x *UpstreamSpec) String() string

type UpstreamSpec_ConsulConsistencyModes added in v1.12.0

type UpstreamSpec_ConsulConsistencyModes int32

These are the same consistency modes offered by Consul. For more information please review https://www.consul.io/api-docs/features/consistency. For more information please review https://pkg.go.dev/github.com/hashicorp/consul/api#QueryOptions.

const (
	// This is strongly consistent. Sets the RequireConsistent in the consul api to true.
	UpstreamSpec_ConsistentMode UpstreamSpec_ConsulConsistencyModes = 0
	// This will set (clears) both the AllowStale and the RequireConsistent in the consul api to false.
	UpstreamSpec_DefaultMode UpstreamSpec_ConsulConsistencyModes = 2
	// Allows stale reads when set. This will set the AllowStale in the consul api.
	UpstreamSpec_StaleMode UpstreamSpec_ConsulConsistencyModes = 1
)

func (UpstreamSpec_ConsulConsistencyModes) Descriptor added in v1.12.0

func (UpstreamSpec_ConsulConsistencyModes) Enum added in v1.12.0

func (UpstreamSpec_ConsulConsistencyModes) EnumDescriptor deprecated added in v1.12.0

func (UpstreamSpec_ConsulConsistencyModes) EnumDescriptor() ([]byte, []int)

Deprecated: Use UpstreamSpec_ConsulConsistencyModes.Descriptor instead.

func (UpstreamSpec_ConsulConsistencyModes) Number added in v1.12.0

func (UpstreamSpec_ConsulConsistencyModes) String added in v1.12.0

func (UpstreamSpec_ConsulConsistencyModes) Type added in v1.12.0

Jump to

Keyboard shortcuts

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