pbservice

package
v1.13.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_pbservice_healthcheck_proto protoreflect.FileDescriptor
View Source
var File_proto_pbservice_node_proto protoreflect.FileDescriptor
View Source
var File_proto_pbservice_service_proto protoreflect.FileDescriptor

Functions

func CheckServiceNodeToStructs

func CheckServiceNodeToStructs(s *CheckServiceNode) (*structs.CheckServiceNode, error)

TODO: use mog once it supports pointers and slices

func CheckTypeFromStructs added in v1.12.0

func CheckTypeFromStructs(t *structs.CheckType, s *CheckType)

func CheckTypeToStructs

func CheckTypeToStructs(s *CheckType, t *structs.CheckType)

func CheckTypesToStructs

func CheckTypesToStructs(s []*CheckType) structs.CheckTypes

TODO: handle this with mog

func ConnectProxyConfigFromStructs added in v1.12.0

func ConnectProxyConfigFromStructs(t *structs.ConnectProxyConfig, s *ConnectProxyConfig)

func ConnectProxyConfigPtrToStructs

func ConnectProxyConfigPtrToStructs(s *ConnectProxyConfig) *structs.ConnectProxyConfig

TODO: handle this with mog

func ConnectProxyConfigToStructs

func ConnectProxyConfigToStructs(s *ConnectProxyConfig, t *structs.ConnectProxyConfig)

func EnterpriseMetaToStructs

func EnterpriseMetaToStructs(_ *pbcommon.EnterpriseMeta) acl.EnterpriseMeta

func ExposeConfigFromStructs added in v1.12.0

func ExposeConfigFromStructs(t *structs.ExposeConfig, s *ExposeConfig)

func ExposeConfigToStructs

func ExposeConfigToStructs(s *ExposeConfig, t *structs.ExposeConfig)

func ExposePathFromStructs added in v1.12.0

func ExposePathFromStructs(t *structs.ExposePath, s *ExposePath)

func ExposePathSliceToStructs

func ExposePathSliceToStructs(s []*ExposePath) []structs.ExposePath

TODO: handle this with mog

func ExposePathToStructs

func ExposePathToStructs(s *ExposePath, t *structs.ExposePath)

func HealthCheckDefinitionFromStructs added in v1.12.0

func HealthCheckDefinitionFromStructs(t *structs.HealthCheckDefinition, s *HealthCheckDefinition)

func HealthCheckDefinitionToStructs

func HealthCheckDefinitionToStructs(s *HealthCheckDefinition, t *structs.HealthCheckDefinition)

func HealthCheckFromStructs added in v1.12.0

func HealthCheckFromStructs(t *structs.HealthCheck, s *HealthCheck)

func HealthCheckToStructs

func HealthCheckToStructs(s *HealthCheck, t *structs.HealthCheck)

func MapHeadersToStructs

func MapHeadersToStructs(s map[string]*HeaderValue) map[string][]string

func MapStringInterfaceToProtobufTypesStruct

func MapStringInterfaceToProtobufTypesStruct(m map[string]interface{}) *types.Struct

MapStringInterfaceToProtobufTypesStruct converts a map[string]interface{} into a proto.Struct

func MapStringServiceAddressToStructs

func MapStringServiceAddressToStructs(s map[string]*ServiceAddress) map[string]structs.ServiceAddress

TODO: handle this with mog

func MeshGatewayConfigFromStructs added in v1.12.0

func MeshGatewayConfigFromStructs(t *structs.MeshGatewayConfig, s *MeshGatewayConfig)

func MeshGatewayConfigToStructs

func MeshGatewayConfigToStructs(s *MeshGatewayConfig, t *structs.MeshGatewayConfig)

func NewEnterpriseMetaFromStructs

func NewEnterpriseMetaFromStructs(_ acl.EnterpriseMeta) *pbcommon.EnterpriseMeta

func NewMapHeadersFromStructs

func NewMapHeadersFromStructs(t map[string][]string) map[string]*HeaderValue

func NewMapStringServiceAddressFromStructs

func NewMapStringServiceAddressFromStructs(t map[string]structs.ServiceAddress) map[string]*ServiceAddress

TODO: handle this with mog

func NewRaftIndexFromStructs

func NewRaftIndexFromStructs(s structs.RaftIndex) *pbcommon.RaftIndex

func NodeFromStructs added in v1.12.0

func NodeFromStructs(t *structs.Node, s *Node)

func NodeServiceFromStructs added in v1.12.0

func NodeServiceFromStructs(t *structs.NodeService, s *NodeService)

func NodeServiceToStructs

func NodeServiceToStructs(s *NodeService, t *structs.NodeService)

func NodeToStructs

func NodeToStructs(s *Node, t *structs.Node)

func PeeringServiceMetaFromStructs added in v1.13.0

func PeeringServiceMetaFromStructs(t *structs.PeeringServiceMeta, s *PeeringServiceMeta)

func PeeringServiceMetaToStructs added in v1.13.0

func PeeringServiceMetaToStructs(s *PeeringServiceMeta, t *structs.PeeringServiceMeta)

func ProtobufTypesStructToMapStringInterface

func ProtobufTypesStructToMapStringInterface(s *types.Struct) map[string]interface{}

ProtobufTypesStructToMapStringInterface converts a protobuf/types.Struct into a map[string]interface{}.

func RaftIndexToStructs

func RaftIndexToStructs(s *pbcommon.RaftIndex) structs.RaftIndex

func ServiceConnectFromStructs added in v1.12.0

func ServiceConnectFromStructs(t *structs.ServiceConnect, s *ServiceConnect)

func ServiceConnectPtrToStructs

func ServiceConnectPtrToStructs(s *ServiceConnect) *structs.ServiceConnect

TODO: handle this with mog

func ServiceConnectToStructs

func ServiceConnectToStructs(s *ServiceConnect, t *structs.ServiceConnect)

func ServiceDefinitionFromStructs added in v1.12.0

func ServiceDefinitionFromStructs(t *structs.ServiceDefinition, s *ServiceDefinition)

func ServiceDefinitionPtrToStructs

func ServiceDefinitionPtrToStructs(s *ServiceDefinition) *structs.ServiceDefinition

TODO: handle this with mog

func ServiceDefinitionToStructs

func ServiceDefinitionToStructs(s *ServiceDefinition, t *structs.ServiceDefinition)

func SliceToPBListValue

func SliceToPBListValue(s []interface{}) *types.ListValue

SliceToPBListValue converts a []interface{} into a proto.ListValue. It's used internally by MapStringInterfaceToProtobufTypesStruct when it encouters slices.

func TransparentProxyConfigFromStructs added in v1.12.0

func TransparentProxyConfigFromStructs(t *structs.TransparentProxyConfig, s *TransparentProxyConfig)

func TransparentProxyConfigToStructs added in v1.10.0

func TransparentProxyConfigToStructs(s *TransparentProxyConfig, t *structs.TransparentProxyConfig)

func UpstreamFromStructs added in v1.12.0

func UpstreamFromStructs(t *structs.Upstream, s *Upstream)

func UpstreamToStructs

func UpstreamToStructs(s *Upstream, t *structs.Upstream)

func UpstreamsToStructs

func UpstreamsToStructs(s []*Upstream) structs.Upstreams

TODO: handle this with mog

func WeightsPtrToStructs

func WeightsPtrToStructs(s *Weights) *structs.Weights

TODO: handle this with mog, once mog handles pointers

Types

type CheckIDType added in v1.12.0

type CheckIDType = types.CheckID

type CheckServiceNode

type CheckServiceNode struct {
	Node    *Node          `protobuf:"bytes,1,opt,name=Node,proto3" json:"Node,omitempty"`
	Service *NodeService   `protobuf:"bytes,2,opt,name=Service,proto3" json:"Service,omitempty"`
	Checks  []*HealthCheck `protobuf:"bytes,3,rep,name=Checks,proto3" json:"Checks,omitempty"`
	// contains filtered or unexported fields
}

CheckServiceNode is used to provide the node, its service definition, as well as a HealthCheck that is associated.

func NewCheckServiceNodeFromStructs

func NewCheckServiceNodeFromStructs(t *structs.CheckServiceNode) *CheckServiceNode

TODO: use mog once it supports pointers and slices

func (*CheckServiceNode) Descriptor deprecated

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

Deprecated: Use CheckServiceNode.ProtoReflect.Descriptor instead.

func (*CheckServiceNode) GetChecks added in v1.12.0

func (x *CheckServiceNode) GetChecks() []*HealthCheck

func (*CheckServiceNode) GetNode added in v1.12.0

func (x *CheckServiceNode) GetNode() *Node

func (*CheckServiceNode) GetService added in v1.12.0

func (x *CheckServiceNode) GetService() *NodeService

func (*CheckServiceNode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*CheckServiceNode) ProtoMessage

func (*CheckServiceNode) ProtoMessage()

func (*CheckServiceNode) ProtoReflect added in v1.12.0

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

func (*CheckServiceNode) Reset

func (x *CheckServiceNode) Reset()

func (*CheckServiceNode) String

func (x *CheckServiceNode) String() string

func (*CheckServiceNode) UniqueID

func (m *CheckServiceNode) UniqueID() string

UniqueID returns a unique identifier for this CheckServiceNode, which includes the node name, service namespace, and service ID.

The returned ID uses slashes to separate the identifiers, however the node name may also contain a slash, so it is not possible to parse this identifier to retrieve its constituent parts.

This function is similar to structs.UniqueID, however at this time no guarantees are made that it will remain the same.

func (*CheckServiceNode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

type CheckType

type CheckType struct {

	// mog: func-to=CheckIDType func-from=string
	CheckID    string   `protobuf:"bytes,1,opt,name=CheckID,proto3" json:"CheckID,omitempty"`
	Name       string   `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	Status     string   `protobuf:"bytes,3,opt,name=Status,proto3" json:"Status,omitempty"`
	Notes      string   `protobuf:"bytes,4,opt,name=Notes,proto3" json:"Notes,omitempty"`
	ScriptArgs []string `protobuf:"bytes,5,rep,name=ScriptArgs,proto3" json:"ScriptArgs,omitempty"`
	HTTP       string   `protobuf:"bytes,6,opt,name=HTTP,proto3" json:"HTTP,omitempty"`
	// mog: func-to=MapHeadersToStructs func-from=NewMapHeadersFromStructs
	Header           map[string]*HeaderValue `` /* 154-byte string literal not displayed */
	Method           string                  `protobuf:"bytes,7,opt,name=Method,proto3" json:"Method,omitempty"`
	Body             string                  `protobuf:"bytes,26,opt,name=Body,proto3" json:"Body,omitempty"`
	DisableRedirects bool                    `protobuf:"varint,31,opt,name=DisableRedirects,proto3" json:"DisableRedirects,omitempty"`
	TCP              string                  `protobuf:"bytes,8,opt,name=TCP,proto3" json:"TCP,omitempty"`
	UDP              string                  `protobuf:"bytes,32,opt,name=UDP,proto3" json:"UDP,omitempty"`
	// mog: func-to=structs.DurationFromProto func-from=structs.DurationToProto
	Interval          *durationpb.Duration `protobuf:"bytes,9,opt,name=Interval,proto3" json:"Interval,omitempty"`
	AliasNode         string               `protobuf:"bytes,10,opt,name=AliasNode,proto3" json:"AliasNode,omitempty"`
	AliasService      string               `protobuf:"bytes,11,opt,name=AliasService,proto3" json:"AliasService,omitempty"`
	DockerContainerID string               `protobuf:"bytes,12,opt,name=DockerContainerID,proto3" json:"DockerContainerID,omitempty"`
	Shell             string               `protobuf:"bytes,13,opt,name=Shell,proto3" json:"Shell,omitempty"`
	H2PING            string               `protobuf:"bytes,28,opt,name=H2PING,proto3" json:"H2PING,omitempty"`
	H2PingUseTLS      bool                 `protobuf:"varint,30,opt,name=H2PingUseTLS,proto3" json:"H2PingUseTLS,omitempty"`
	GRPC              string               `protobuf:"bytes,14,opt,name=GRPC,proto3" json:"GRPC,omitempty"`
	GRPCUseTLS        bool                 `protobuf:"varint,15,opt,name=GRPCUseTLS,proto3" json:"GRPCUseTLS,omitempty"`
	TLSServerName     string               `protobuf:"bytes,27,opt,name=TLSServerName,proto3" json:"TLSServerName,omitempty"`
	TLSSkipVerify     bool                 `protobuf:"varint,16,opt,name=TLSSkipVerify,proto3" json:"TLSSkipVerify,omitempty"`
	// mog: func-to=structs.DurationFromProto func-from=structs.DurationToProto
	Timeout *durationpb.Duration `protobuf:"bytes,17,opt,name=Timeout,proto3" json:"Timeout,omitempty"`
	// mog: func-to=structs.DurationFromProto func-from=structs.DurationToProto
	TTL *durationpb.Duration `protobuf:"bytes,18,opt,name=TTL,proto3" json:"TTL,omitempty"`
	// mog: func-to=int func-from=int32
	SuccessBeforePassing int32 `protobuf:"varint,21,opt,name=SuccessBeforePassing,proto3" json:"SuccessBeforePassing,omitempty"`
	// mog: func-to=int func-from=int32
	FailuresBeforeWarning int32 `protobuf:"varint,29,opt,name=FailuresBeforeWarning,proto3" json:"FailuresBeforeWarning,omitempty"`
	// mog: func-to=int func-from=int32
	FailuresBeforeCritical int32 `protobuf:"varint,22,opt,name=FailuresBeforeCritical,proto3" json:"FailuresBeforeCritical,omitempty"`
	// Definition fields used when exposing checks through a proxy
	ProxyHTTP string `protobuf:"bytes,23,opt,name=ProxyHTTP,proto3" json:"ProxyHTTP,omitempty"`
	ProxyGRPC string `protobuf:"bytes,24,opt,name=ProxyGRPC,proto3" json:"ProxyGRPC,omitempty"`
	// DeregisterCriticalServiceAfter, if >0, will cause the associated
	// service, if any, to be deregistered if this check is critical for
	// longer than this duration.
	// mog: func-to=structs.DurationFromProto func-from=structs.DurationToProto
	DeregisterCriticalServiceAfter *durationpb.Duration `protobuf:"bytes,19,opt,name=DeregisterCriticalServiceAfter,proto3" json:"DeregisterCriticalServiceAfter,omitempty"`
	// mog: func-to=int func-from=int32
	OutputMaxSize int32 `protobuf:"varint,25,opt,name=OutputMaxSize,proto3" json:"OutputMaxSize,omitempty"`
	// contains filtered or unexported fields
}

CheckType is used to create either the CheckMonitor or the CheckTTL. The following types are supported: Script, HTTP, TCP, Docker, TTL, GRPC, Alias. Script, H2PING, HTTP, Docker, TCP, H2PING and GRPC all require Interval. Only one of the types may to be provided: TTL or Script/Interval or HTTP/Interval or TCP/Interval or Docker/Interval or GRPC/Interval or H2PING/Interval or AliasService.

mog annotation:

target=github.com/hashicorp/consul/agent/structs.CheckType output=healthcheck.gen.go name=Structs

func NewCheckTypesFromStructs

func NewCheckTypesFromStructs(t structs.CheckTypes) []*CheckType

TODO: handle this with mog

func (*CheckType) Descriptor deprecated

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

Deprecated: Use CheckType.ProtoReflect.Descriptor instead.

func (*CheckType) GetAliasNode added in v1.12.0

func (x *CheckType) GetAliasNode() string

func (*CheckType) GetAliasService added in v1.12.0

func (x *CheckType) GetAliasService() string

func (*CheckType) GetBody added in v1.12.0

func (x *CheckType) GetBody() string

func (*CheckType) GetCheckID added in v1.12.0

func (x *CheckType) GetCheckID() string

func (*CheckType) GetDeregisterCriticalServiceAfter added in v1.12.0

func (x *CheckType) GetDeregisterCriticalServiceAfter() *durationpb.Duration

func (*CheckType) GetDisableRedirects added in v1.12.0

func (x *CheckType) GetDisableRedirects() bool

func (*CheckType) GetDockerContainerID added in v1.12.0

func (x *CheckType) GetDockerContainerID() string

func (*CheckType) GetFailuresBeforeCritical added in v1.12.0

func (x *CheckType) GetFailuresBeforeCritical() int32

func (*CheckType) GetFailuresBeforeWarning added in v1.12.0

func (x *CheckType) GetFailuresBeforeWarning() int32

func (*CheckType) GetGRPC added in v1.12.0

func (x *CheckType) GetGRPC() string

func (*CheckType) GetGRPCUseTLS added in v1.12.0

func (x *CheckType) GetGRPCUseTLS() bool

func (*CheckType) GetH2PING added in v1.12.0

func (x *CheckType) GetH2PING() string

func (*CheckType) GetH2PingUseTLS added in v1.12.0

func (x *CheckType) GetH2PingUseTLS() bool

func (*CheckType) GetHTTP added in v1.12.0

func (x *CheckType) GetHTTP() string

func (*CheckType) GetHeader added in v1.12.0

func (x *CheckType) GetHeader() map[string]*HeaderValue

func (*CheckType) GetInterval added in v1.12.0

func (x *CheckType) GetInterval() *durationpb.Duration

func (*CheckType) GetMethod added in v1.12.0

func (x *CheckType) GetMethod() string

func (*CheckType) GetName added in v1.12.0

func (x *CheckType) GetName() string

func (*CheckType) GetNotes added in v1.12.0

func (x *CheckType) GetNotes() string

func (*CheckType) GetOutputMaxSize added in v1.12.0

func (x *CheckType) GetOutputMaxSize() int32

func (*CheckType) GetProxyGRPC added in v1.12.0

func (x *CheckType) GetProxyGRPC() string

func (*CheckType) GetProxyHTTP added in v1.12.0

func (x *CheckType) GetProxyHTTP() string

func (*CheckType) GetScriptArgs added in v1.12.0

func (x *CheckType) GetScriptArgs() []string

func (*CheckType) GetShell added in v1.12.0

func (x *CheckType) GetShell() string

func (*CheckType) GetStatus added in v1.12.0

func (x *CheckType) GetStatus() string

func (*CheckType) GetSuccessBeforePassing added in v1.12.0

func (x *CheckType) GetSuccessBeforePassing() int32

func (*CheckType) GetTCP added in v1.12.0

func (x *CheckType) GetTCP() string

func (*CheckType) GetTLSServerName added in v1.12.0

func (x *CheckType) GetTLSServerName() string

func (*CheckType) GetTLSSkipVerify added in v1.12.0

func (x *CheckType) GetTLSSkipVerify() bool

func (*CheckType) GetTTL added in v1.12.0

func (x *CheckType) GetTTL() *durationpb.Duration

func (*CheckType) GetTimeout added in v1.12.0

func (x *CheckType) GetTimeout() *durationpb.Duration

func (*CheckType) GetUDP added in v1.13.0

func (x *CheckType) GetUDP() string

func (*CheckType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*CheckType) ProtoMessage

func (*CheckType) ProtoMessage()

func (*CheckType) ProtoReflect added in v1.12.0

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

func (*CheckType) Reset

func (x *CheckType) Reset()

func (*CheckType) String

func (x *CheckType) String() string

func (*CheckType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

type ConnectProxyConfig

type ConnectProxyConfig struct {

	// DestinationServiceName is required and is the name of the service to accept
	// traffic for.
	DestinationServiceName string `protobuf:"bytes,1,opt,name=DestinationServiceName,proto3" json:"DestinationServiceName,omitempty"`
	// DestinationServiceID is optional and should only be specified for
	// "side-car" style proxies where the proxy is in front of just a single
	// instance of the service. It should be set to the service ID of the instance
	// being represented which must be registered to the same agent. It's valid to
	// provide a service ID that does not yet exist to avoid timing issues when
	// bootstrapping a service with a proxy.
	DestinationServiceID string `protobuf:"bytes,2,opt,name=DestinationServiceID,proto3" json:"DestinationServiceID,omitempty"`
	// LocalServiceAddress is the address of the local service instance. It is
	// optional and should only be specified for "side-car" style proxies. It will
	// default to 127.0.0.1 if the proxy is a "side-car" (DestinationServiceID is
	// set) but otherwise will be ignored.
	LocalServiceAddress string `protobuf:"bytes,3,opt,name=LocalServiceAddress,proto3" json:"LocalServiceAddress,omitempty"`
	// LocalServicePort is the port of the local service instance. It is optional
	// and should only be specified for "side-car" style proxies. It will default
	// to the registered port for the instance if the proxy is a "side-car"
	// (DestinationServiceID is set) but otherwise will be ignored.
	// mog: func-to=int func-from=int32
	LocalServicePort int32 `protobuf:"varint,4,opt,name=LocalServicePort,proto3" json:"LocalServicePort,omitempty"`
	// Config is the arbitrary configuration data provided with the proxy
	// registration.
	// mog: func-to=ProtobufTypesStructToMapStringInterface func-from=MapStringInterfaceToProtobufTypesStruct
	Config *structpb.Struct `protobuf:"bytes,5,opt,name=Config,proto3" json:"Config,omitempty"`
	// Upstreams describes any upstream dependencies the proxy instance should
	// setup.
	// mog: func-to=UpstreamsToStructs func-from=NewUpstreamsFromStructs
	Upstreams []*Upstream `protobuf:"bytes,6,rep,name=Upstreams,proto3" json:"Upstreams,omitempty"`
	// MeshGateway defines the mesh gateway configuration for upstreams
	MeshGateway *MeshGatewayConfig `protobuf:"bytes,7,opt,name=MeshGateway,proto3" json:"MeshGateway,omitempty"`
	// Expose defines whether checks or paths are exposed through the proxy
	Expose *ExposeConfig `protobuf:"bytes,8,opt,name=Expose,proto3" json:"Expose,omitempty"`
	// Mode represents how the proxy's inbound and upstream listeners are dialed.
	// mog: func-to=structs.ProxyMode func-from=string
	Mode string `protobuf:"bytes,9,opt,name=Mode,proto3" json:"Mode,omitempty"`
	// TransparentProxy defines configuration for when the proxy is in
	// transparent mode.
	TransparentProxy *TransparentProxyConfig `protobuf:"bytes,10,opt,name=TransparentProxy,proto3" json:"TransparentProxy,omitempty"`
	// LocalServiceSocketPath is the path to the unix domain socket for the local service instance
	LocalServiceSocketPath string `protobuf:"bytes,11,opt,name=LocalServiceSocketPath,proto3" json:"LocalServiceSocketPath,omitempty"`
	// contains filtered or unexported fields
}

ConnectProxyConfig describes the configuration needed for any proxy managed or unmanaged. It describes a single logical service's listener and optionally upstreams and sidecar-related config for a single instance. To describe a centralized proxy that routed traffic for multiple services, a different one of these would be needed for each, sharing the same LogicalProxyID.

mog annotation:

target=github.com/hashicorp/consul/agent/structs.ConnectProxyConfig output=service.gen.go name=Structs

func NewConnectProxyConfigPtrFromStructs

func NewConnectProxyConfigPtrFromStructs(t *structs.ConnectProxyConfig) *ConnectProxyConfig

TODO: handle this with mog

func (*ConnectProxyConfig) Descriptor deprecated

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

Deprecated: Use ConnectProxyConfig.ProtoReflect.Descriptor instead.

func (*ConnectProxyConfig) GetConfig added in v1.12.0

func (x *ConnectProxyConfig) GetConfig() *structpb.Struct

func (*ConnectProxyConfig) GetDestinationServiceID added in v1.12.0

func (x *ConnectProxyConfig) GetDestinationServiceID() string

func (*ConnectProxyConfig) GetDestinationServiceName added in v1.12.0

func (x *ConnectProxyConfig) GetDestinationServiceName() string

func (*ConnectProxyConfig) GetExpose added in v1.12.0

func (x *ConnectProxyConfig) GetExpose() *ExposeConfig

func (*ConnectProxyConfig) GetLocalServiceAddress added in v1.12.0

func (x *ConnectProxyConfig) GetLocalServiceAddress() string

func (*ConnectProxyConfig) GetLocalServicePort added in v1.12.0

func (x *ConnectProxyConfig) GetLocalServicePort() int32

func (*ConnectProxyConfig) GetLocalServiceSocketPath added in v1.12.0

func (x *ConnectProxyConfig) GetLocalServiceSocketPath() string

func (*ConnectProxyConfig) GetMeshGateway added in v1.12.0

func (x *ConnectProxyConfig) GetMeshGateway() *MeshGatewayConfig

func (*ConnectProxyConfig) GetMode added in v1.12.0

func (x *ConnectProxyConfig) GetMode() string

func (*ConnectProxyConfig) GetTransparentProxy added in v1.12.0

func (x *ConnectProxyConfig) GetTransparentProxy() *TransparentProxyConfig

func (*ConnectProxyConfig) GetUpstreams added in v1.12.0

func (x *ConnectProxyConfig) GetUpstreams() []*Upstream

func (*ConnectProxyConfig) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*ConnectProxyConfig) ProtoMessage

func (*ConnectProxyConfig) ProtoMessage()

func (*ConnectProxyConfig) ProtoReflect added in v1.12.0

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

func (*ConnectProxyConfig) Reset

func (x *ConnectProxyConfig) Reset()

func (*ConnectProxyConfig) String

func (x *ConnectProxyConfig) String() string

func (*ConnectProxyConfig) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

type ExposeConfig

type ExposeConfig struct {

	// Checks defines whether paths associated with Consul checks will be exposed.
	// This flag triggers exposing all HTTP and GRPC check paths registered for the service.
	Checks bool `protobuf:"varint,1,opt,name=Checks,proto3" json:"Checks,omitempty"`
	// Paths is the list of paths exposed through the proxy.
	// mog: func-to=ExposePathSliceToStructs func-from=NewExposePathSliceFromStructs
	Paths []*ExposePath `protobuf:"bytes,2,rep,name=Paths,proto3" json:"Paths,omitempty"`
	// contains filtered or unexported fields
}

ExposeConfig describes HTTP paths to expose through Envoy outside of Connect. Users can expose individual paths and/or all HTTP/GRPC paths for checks.

mog annotation:

target=github.com/hashicorp/consul/agent/structs.ExposeConfig output=service.gen.go name=Structs

func (*ExposeConfig) Descriptor deprecated

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

Deprecated: Use ExposeConfig.ProtoReflect.Descriptor instead.

func (*ExposeConfig) GetChecks added in v1.12.0

func (x *ExposeConfig) GetChecks() bool

func (*ExposeConfig) GetPaths added in v1.12.0

func (x *ExposeConfig) GetPaths() []*ExposePath

func (*ExposeConfig) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*ExposeConfig) ProtoMessage

func (*ExposeConfig) ProtoMessage()

func (*ExposeConfig) ProtoReflect added in v1.12.0

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

func (*ExposeConfig) Reset

func (x *ExposeConfig) Reset()

func (*ExposeConfig) String

func (x *ExposeConfig) String() string

func (*ExposeConfig) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

type ExposePath

type ExposePath struct {

	// ListenerPort defines the port of the proxy's listener for exposed paths.
	// mog: func-to=int func-from=int32
	ListenerPort int32 `protobuf:"varint,1,opt,name=ListenerPort,proto3" json:"ListenerPort,omitempty"`
	// ExposePath is the path to expose through the proxy, ie. "/metrics."
	Path string `protobuf:"bytes,2,opt,name=Path,proto3" json:"Path,omitempty"`
	// LocalPathPort is the port that the service is listening on for the given path.
	// mog: func-to=int func-from=int32
	LocalPathPort int32 `protobuf:"varint,3,opt,name=LocalPathPort,proto3" json:"LocalPathPort,omitempty"`
	// Protocol describes the upstream's service protocol.
	// Valid values are "http" and "http2", defaults to "http"
	Protocol string `protobuf:"bytes,4,opt,name=Protocol,proto3" json:"Protocol,omitempty"`
	// ParsedFromCheck is set if this path was parsed from a registered check
	ParsedFromCheck bool `protobuf:"varint,5,opt,name=ParsedFromCheck,proto3" json:"ParsedFromCheck,omitempty"`
	// contains filtered or unexported fields
}

mog annotation:

target=github.com/hashicorp/consul/agent/structs.ExposePath output=service.gen.go name=Structs

func NewExposePathSliceFromStructs

func NewExposePathSliceFromStructs(t []structs.ExposePath) []*ExposePath

TODO: handle this with mog

func (*ExposePath) Descriptor deprecated

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

Deprecated: Use ExposePath.ProtoReflect.Descriptor instead.

func (*ExposePath) GetListenerPort added in v1.12.0

func (x *ExposePath) GetListenerPort() int32

func (*ExposePath) GetLocalPathPort added in v1.12.0

func (x *ExposePath) GetLocalPathPort() int32

func (*ExposePath) GetParsedFromCheck added in v1.12.0

func (x *ExposePath) GetParsedFromCheck() bool

func (*ExposePath) GetPath added in v1.12.0

func (x *ExposePath) GetPath() string

func (*ExposePath) GetProtocol added in v1.12.0

func (x *ExposePath) GetProtocol() string

func (*ExposePath) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*ExposePath) ProtoMessage

func (*ExposePath) ProtoMessage()

func (*ExposePath) ProtoReflect added in v1.12.0

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

func (*ExposePath) Reset

func (x *ExposePath) Reset()

func (*ExposePath) String

func (x *ExposePath) String() string

func (*ExposePath) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

type HeaderValue

type HeaderValue struct {
	Value []string `protobuf:"bytes,1,rep,name=Value,proto3" json:"Value,omitempty"`
	// contains filtered or unexported fields
}

func (*HeaderValue) Descriptor deprecated

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

Deprecated: Use HeaderValue.ProtoReflect.Descriptor instead.

func (*HeaderValue) GetValue added in v1.12.0

func (x *HeaderValue) GetValue() []string

func (*HeaderValue) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*HeaderValue) ProtoMessage

func (*HeaderValue) ProtoMessage()

func (*HeaderValue) ProtoReflect added in v1.12.0

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

func (*HeaderValue) Reset

func (x *HeaderValue) Reset()

func (*HeaderValue) String

func (x *HeaderValue) String() string

func (*HeaderValue) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

type HealthCheck

type HealthCheck struct {
	Node string `protobuf:"bytes,1,opt,name=Node,proto3" json:"Node,omitempty"`
	// mog: func-to=CheckIDType func-from=string
	CheckID     string                 `protobuf:"bytes,2,opt,name=CheckID,proto3" json:"CheckID,omitempty"`
	Name        string                 `protobuf:"bytes,3,opt,name=Name,proto3" json:"Name,omitempty"`
	Status      string                 `protobuf:"bytes,4,opt,name=Status,proto3" json:"Status,omitempty"`           // The current check status
	Notes       string                 `protobuf:"bytes,5,opt,name=Notes,proto3" json:"Notes,omitempty"`             // Additional notes with the status
	Output      string                 `protobuf:"bytes,6,opt,name=Output,proto3" json:"Output,omitempty"`           // Holds output of script runs
	ServiceID   string                 `protobuf:"bytes,7,opt,name=ServiceID,proto3" json:"ServiceID,omitempty"`     // optional associated service
	ServiceName string                 `protobuf:"bytes,8,opt,name=ServiceName,proto3" json:"ServiceName,omitempty"` // optional service name
	ServiceTags []string               `protobuf:"bytes,9,rep,name=ServiceTags,proto3" json:"ServiceTags,omitempty"` // optional service tags
	Type        string                 `protobuf:"bytes,12,opt,name=Type,proto3" json:"Type,omitempty"`              // Check type: http/ttl/tcp/etc
	Definition  *HealthCheckDefinition `protobuf:"bytes,10,opt,name=Definition,proto3" json:"Definition,omitempty"`
	// mog: func-to=RaftIndexToStructs func-from=NewRaftIndexFromStructs
	RaftIndex *pbcommon.RaftIndex `protobuf:"bytes,11,opt,name=RaftIndex,proto3" json:"RaftIndex,omitempty"`
	// mog: func-to=EnterpriseMetaToStructs func-from=NewEnterpriseMetaFromStructs
	EnterpriseMeta *pbcommon.EnterpriseMeta `protobuf:"bytes,13,opt,name=EnterpriseMeta,proto3" json:"EnterpriseMeta,omitempty"`
	// mog: func-to=int func-from=int32
	ExposedPort int32  `protobuf:"varint,14,opt,name=ExposedPort,proto3" json:"ExposedPort,omitempty"`
	Interval    string `protobuf:"bytes,15,opt,name=Interval,proto3" json:"Interval,omitempty"`
	Timeout     string `protobuf:"bytes,16,opt,name=Timeout,proto3" json:"Timeout,omitempty"`
	PeerName    string `protobuf:"bytes,17,opt,name=PeerName,proto3" json:"PeerName,omitempty"`
	// contains filtered or unexported fields
}

HealthCheck represents a single check on a given node

mog annotation:

target=github.com/hashicorp/consul/agent/structs.HealthCheck output=healthcheck.gen.go name=Structs

func (*HealthCheck) Descriptor deprecated

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

Deprecated: Use HealthCheck.ProtoReflect.Descriptor instead.

func (*HealthCheck) GetCheckID added in v1.12.0

func (x *HealthCheck) GetCheckID() string

func (*HealthCheck) GetDefinition added in v1.12.0

func (x *HealthCheck) GetDefinition() *HealthCheckDefinition

func (*HealthCheck) GetEnterpriseMeta added in v1.12.0

func (x *HealthCheck) GetEnterpriseMeta() *pbcommon.EnterpriseMeta

func (*HealthCheck) GetExposedPort added in v1.12.0

func (x *HealthCheck) GetExposedPort() int32

func (*HealthCheck) GetInterval added in v1.12.0

func (x *HealthCheck) GetInterval() string

func (*HealthCheck) GetName added in v1.12.0

func (x *HealthCheck) GetName() string

func (*HealthCheck) GetNode added in v1.12.0

func (x *HealthCheck) GetNode() string

func (*HealthCheck) GetNotes added in v1.12.0

func (x *HealthCheck) GetNotes() string

func (*HealthCheck) GetOutput added in v1.12.0

func (x *HealthCheck) GetOutput() string

func (*HealthCheck) GetPeerName added in v1.13.0

func (x *HealthCheck) GetPeerName() string

func (*HealthCheck) GetRaftIndex added in v1.12.0

func (x *HealthCheck) GetRaftIndex() *pbcommon.RaftIndex

func (*HealthCheck) GetServiceID added in v1.12.0

func (x *HealthCheck) GetServiceID() string

func (*HealthCheck) GetServiceName added in v1.12.0

func (x *HealthCheck) GetServiceName() string

func (*HealthCheck) GetServiceTags added in v1.12.0

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

func (*HealthCheck) GetStatus added in v1.12.0

func (x *HealthCheck) GetStatus() string

func (*HealthCheck) GetTimeout added in v1.12.0

func (x *HealthCheck) GetTimeout() string

func (*HealthCheck) GetType added in v1.12.0

func (x *HealthCheck) GetType() string

func (*HealthCheck) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*HealthCheck) ProtoMessage

func (*HealthCheck) ProtoMessage()

func (*HealthCheck) ProtoReflect added in v1.12.0

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

func (*HealthCheck) Reset

func (x *HealthCheck) Reset()

func (*HealthCheck) String

func (x *HealthCheck) String() string

func (*HealthCheck) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

type HealthCheckDefinition

type HealthCheckDefinition struct {
	HTTP          string `protobuf:"bytes,1,opt,name=HTTP,proto3" json:"HTTP,omitempty"`
	TLSServerName string `protobuf:"bytes,19,opt,name=TLSServerName,proto3" json:"TLSServerName,omitempty"`
	TLSSkipVerify bool   `protobuf:"varint,2,opt,name=TLSSkipVerify,proto3" json:"TLSSkipVerify,omitempty"`
	// mog: func-to=MapHeadersToStructs func-from=NewMapHeadersFromStructs
	Header           map[string]*HeaderValue `` /* 153-byte string literal not displayed */
	Method           string                  `protobuf:"bytes,4,opt,name=Method,proto3" json:"Method,omitempty"`
	Body             string                  `protobuf:"bytes,18,opt,name=Body,proto3" json:"Body,omitempty"`
	DisableRedirects bool                    `protobuf:"varint,22,opt,name=DisableRedirects,proto3" json:"DisableRedirects,omitempty"`
	TCP              string                  `protobuf:"bytes,5,opt,name=TCP,proto3" json:"TCP,omitempty"`
	UDP              string                  `protobuf:"bytes,23,opt,name=UDP,proto3" json:"UDP,omitempty"`
	// mog: func-to=structs.DurationFromProto func-from=structs.DurationToProto
	Interval *durationpb.Duration `protobuf:"bytes,6,opt,name=Interval,proto3" json:"Interval,omitempty"`
	// mog: func-to=uint func-from=uint32
	OutputMaxSize uint32 `protobuf:"varint,9,opt,name=OutputMaxSize,proto3" json:"OutputMaxSize,omitempty"`
	// mog: func-to=structs.DurationFromProto func-from=structs.DurationToProto
	Timeout *durationpb.Duration `protobuf:"bytes,7,opt,name=Timeout,proto3" json:"Timeout,omitempty"`
	// mog: func-to=structs.DurationFromProto func-from=structs.DurationToProto
	DeregisterCriticalServiceAfter *durationpb.Duration `protobuf:"bytes,8,opt,name=DeregisterCriticalServiceAfter,proto3" json:"DeregisterCriticalServiceAfter,omitempty"`
	ScriptArgs                     []string             `protobuf:"bytes,10,rep,name=ScriptArgs,proto3" json:"ScriptArgs,omitempty"`
	DockerContainerID              string               `protobuf:"bytes,11,opt,name=DockerContainerID,proto3" json:"DockerContainerID,omitempty"`
	Shell                          string               `protobuf:"bytes,12,opt,name=Shell,proto3" json:"Shell,omitempty"`
	H2PING                         string               `protobuf:"bytes,20,opt,name=H2PING,proto3" json:"H2PING,omitempty"`
	H2PingUseTLS                   bool                 `protobuf:"varint,21,opt,name=H2PingUseTLS,proto3" json:"H2PingUseTLS,omitempty"`
	GRPC                           string               `protobuf:"bytes,13,opt,name=GRPC,proto3" json:"GRPC,omitempty"`
	GRPCUseTLS                     bool                 `protobuf:"varint,14,opt,name=GRPCUseTLS,proto3" json:"GRPCUseTLS,omitempty"`
	AliasNode                      string               `protobuf:"bytes,15,opt,name=AliasNode,proto3" json:"AliasNode,omitempty"`
	AliasService                   string               `protobuf:"bytes,16,opt,name=AliasService,proto3" json:"AliasService,omitempty"`
	// mog: func-to=structs.DurationFromProto func-from=structs.DurationToProto
	TTL *durationpb.Duration `protobuf:"bytes,17,opt,name=TTL,proto3" json:"TTL,omitempty"`
	// contains filtered or unexported fields
}

HealthCheckDefinition of a single HealthCheck.

mog annotation:

target=github.com/hashicorp/consul/agent/structs.HealthCheckDefinition output=healthcheck.gen.go name=Structs

func (*HealthCheckDefinition) Descriptor deprecated

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

Deprecated: Use HealthCheckDefinition.ProtoReflect.Descriptor instead.

func (*HealthCheckDefinition) GetAliasNode added in v1.12.0

func (x *HealthCheckDefinition) GetAliasNode() string

func (*HealthCheckDefinition) GetAliasService added in v1.12.0

func (x *HealthCheckDefinition) GetAliasService() string

func (*HealthCheckDefinition) GetBody added in v1.12.0

func (x *HealthCheckDefinition) GetBody() string

func (*HealthCheckDefinition) GetDeregisterCriticalServiceAfter added in v1.12.0

func (x *HealthCheckDefinition) GetDeregisterCriticalServiceAfter() *durationpb.Duration

func (*HealthCheckDefinition) GetDisableRedirects added in v1.12.0

func (x *HealthCheckDefinition) GetDisableRedirects() bool

func (*HealthCheckDefinition) GetDockerContainerID added in v1.12.0

func (x *HealthCheckDefinition) GetDockerContainerID() string

func (*HealthCheckDefinition) GetGRPC added in v1.12.0

func (x *HealthCheckDefinition) GetGRPC() string

func (*HealthCheckDefinition) GetGRPCUseTLS added in v1.12.0

func (x *HealthCheckDefinition) GetGRPCUseTLS() bool

func (*HealthCheckDefinition) GetH2PING added in v1.12.0

func (x *HealthCheckDefinition) GetH2PING() string

func (*HealthCheckDefinition) GetH2PingUseTLS added in v1.12.0

func (x *HealthCheckDefinition) GetH2PingUseTLS() bool

func (*HealthCheckDefinition) GetHTTP added in v1.12.0

func (x *HealthCheckDefinition) GetHTTP() string

func (*HealthCheckDefinition) GetHeader added in v1.12.0

func (x *HealthCheckDefinition) GetHeader() map[string]*HeaderValue

func (*HealthCheckDefinition) GetInterval added in v1.12.0

func (x *HealthCheckDefinition) GetInterval() *durationpb.Duration

func (*HealthCheckDefinition) GetMethod added in v1.12.0

func (x *HealthCheckDefinition) GetMethod() string

func (*HealthCheckDefinition) GetOutputMaxSize added in v1.12.0

func (x *HealthCheckDefinition) GetOutputMaxSize() uint32

func (*HealthCheckDefinition) GetScriptArgs added in v1.12.0

func (x *HealthCheckDefinition) GetScriptArgs() []string

func (*HealthCheckDefinition) GetShell added in v1.12.0

func (x *HealthCheckDefinition) GetShell() string

func (*HealthCheckDefinition) GetTCP added in v1.12.0

func (x *HealthCheckDefinition) GetTCP() string

func (*HealthCheckDefinition) GetTLSServerName added in v1.12.0

func (x *HealthCheckDefinition) GetTLSServerName() string

func (*HealthCheckDefinition) GetTLSSkipVerify added in v1.12.0

func (x *HealthCheckDefinition) GetTLSSkipVerify() bool

func (*HealthCheckDefinition) GetTTL added in v1.12.0

func (*HealthCheckDefinition) GetTimeout added in v1.12.0

func (x *HealthCheckDefinition) GetTimeout() *durationpb.Duration

func (*HealthCheckDefinition) GetUDP added in v1.13.0

func (x *HealthCheckDefinition) GetUDP() string

func (*HealthCheckDefinition) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*HealthCheckDefinition) ProtoMessage

func (*HealthCheckDefinition) ProtoMessage()

func (*HealthCheckDefinition) ProtoReflect added in v1.12.0

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

func (*HealthCheckDefinition) Reset

func (x *HealthCheckDefinition) Reset()

func (*HealthCheckDefinition) String

func (x *HealthCheckDefinition) String() string

func (*HealthCheckDefinition) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

type IndexedCheckServiceNodes added in v1.13.0

type IndexedCheckServiceNodes struct {
	Index uint64              `protobuf:"varint,1,opt,name=Index,proto3" json:"Index,omitempty"`
	Nodes []*CheckServiceNode `protobuf:"bytes,2,rep,name=Nodes,proto3" json:"Nodes,omitempty"`
	// contains filtered or unexported fields
}

IndexedCheckServiceNodes is used to return multiple instances for a given service.

func (*IndexedCheckServiceNodes) CheckServiceNodesToStruct

func (s *IndexedCheckServiceNodes) CheckServiceNodesToStruct() ([]structs.CheckServiceNode, error)

CheckServiceNodesToStruct converts the contained CheckServiceNodes to their structs equivalent.

func (*IndexedCheckServiceNodes) Descriptor deprecated added in v1.13.0

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

Deprecated: Use IndexedCheckServiceNodes.ProtoReflect.Descriptor instead.

func (*IndexedCheckServiceNodes) GetIndex added in v1.13.0

func (x *IndexedCheckServiceNodes) GetIndex() uint64

func (*IndexedCheckServiceNodes) GetNodes added in v1.13.0

func (x *IndexedCheckServiceNodes) GetNodes() []*CheckServiceNode

func (*IndexedCheckServiceNodes) MarshalBinary added in v1.13.0

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

MarshalBinary implements encoding.BinaryMarshaler

func (*IndexedCheckServiceNodes) ProtoMessage added in v1.13.0

func (*IndexedCheckServiceNodes) ProtoMessage()

func (*IndexedCheckServiceNodes) ProtoReflect added in v1.13.0

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

func (*IndexedCheckServiceNodes) Reset added in v1.13.0

func (x *IndexedCheckServiceNodes) Reset()

func (*IndexedCheckServiceNodes) String added in v1.13.0

func (x *IndexedCheckServiceNodes) String() string

func (*IndexedCheckServiceNodes) UnmarshalBinary added in v1.13.0

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

type MeshGatewayConfig

type MeshGatewayConfig struct {

	// mog: func-to=structs.MeshGatewayMode func-from=string
	Mode string `protobuf:"bytes,1,opt,name=Mode,proto3" json:"Mode,omitempty"`
	// contains filtered or unexported fields
}

mog annotation:

target=github.com/hashicorp/consul/agent/structs.MeshGatewayConfig output=service.gen.go name=Structs

func (*MeshGatewayConfig) Descriptor deprecated

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

Deprecated: Use MeshGatewayConfig.ProtoReflect.Descriptor instead.

func (*MeshGatewayConfig) GetMode added in v1.12.0

func (x *MeshGatewayConfig) GetMode() string

func (*MeshGatewayConfig) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*MeshGatewayConfig) ProtoMessage

func (*MeshGatewayConfig) ProtoMessage()

func (*MeshGatewayConfig) ProtoReflect added in v1.12.0

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

func (*MeshGatewayConfig) Reset

func (x *MeshGatewayConfig) Reset()

func (*MeshGatewayConfig) String

func (x *MeshGatewayConfig) String() string

func (*MeshGatewayConfig) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

type Node

type Node struct {

	// mog: func-to=NodeIDType func-from=string
	ID              string            `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Node            string            `protobuf:"bytes,2,opt,name=Node,proto3" json:"Node,omitempty"`
	Partition       string            `protobuf:"bytes,8,opt,name=Partition,proto3" json:"Partition,omitempty"`
	PeerName        string            `protobuf:"bytes,9,opt,name=PeerName,proto3" json:"PeerName,omitempty"`
	Address         string            `protobuf:"bytes,3,opt,name=Address,proto3" json:"Address,omitempty"`
	Datacenter      string            `protobuf:"bytes,4,opt,name=Datacenter,proto3" json:"Datacenter,omitempty"`
	TaggedAddresses map[string]string `` /* 171-byte string literal not displayed */
	Meta            map[string]string `` /* 149-byte string literal not displayed */
	// mog: func-to=RaftIndexToStructs func-from=NewRaftIndexFromStructs
	RaftIndex *pbcommon.RaftIndex `protobuf:"bytes,7,opt,name=RaftIndex,proto3" json:"RaftIndex,omitempty"`
	// contains filtered or unexported fields
}

Node contains information about a node.

mog annotation:

target=github.com/hashicorp/consul/agent/structs.Node output=node.gen.go name=Structs

func (*Node) Descriptor deprecated

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

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) GetAddress added in v1.12.0

func (x *Node) GetAddress() string

func (*Node) GetDatacenter added in v1.12.0

func (x *Node) GetDatacenter() string

func (*Node) GetID added in v1.12.0

func (x *Node) GetID() string

func (*Node) GetMeta added in v1.12.0

func (x *Node) GetMeta() map[string]string

func (*Node) GetNode added in v1.12.0

func (x *Node) GetNode() string

func (*Node) GetPartition added in v1.12.0

func (x *Node) GetPartition() string

func (*Node) GetPeerName added in v1.13.0

func (x *Node) GetPeerName() string

func (*Node) GetRaftIndex added in v1.12.0

func (x *Node) GetRaftIndex() *pbcommon.RaftIndex

func (*Node) GetTaggedAddresses added in v1.12.0

func (x *Node) GetTaggedAddresses() map[string]string

func (*Node) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect added in v1.12.0

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

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

func (*Node) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

type NodeIDType added in v1.12.0

type NodeIDType = types.NodeID

type NodeService

type NodeService struct {

	// Kind is the kind of service this is. Different kinds of services may
	// have differing validation, DNS behavior, etc. An empty kind will default
	// to the Default kind. See ServiceKind for the full list of kinds.
	// mog: func-to=structs.ServiceKind func-from=string
	Kind    string   `protobuf:"bytes,1,opt,name=Kind,proto3" json:"Kind,omitempty"`
	ID      string   `protobuf:"bytes,2,opt,name=ID,proto3" json:"ID,omitempty"`
	Service string   `protobuf:"bytes,3,opt,name=Service,proto3" json:"Service,omitempty"`
	Tags    []string `protobuf:"bytes,4,rep,name=Tags,proto3" json:"Tags,omitempty"`
	Address string   `protobuf:"bytes,5,opt,name=Address,proto3" json:"Address,omitempty"`
	// mog: func-to=MapStringServiceAddressToStructs func-from=NewMapStringServiceAddressFromStructs
	TaggedAddresses map[string]*ServiceAddress `` /* 172-byte string literal not displayed */
	Meta            map[string]string          `` /* 149-byte string literal not displayed */
	// mog: func-to=int func-from=int32
	Port       int32  `protobuf:"varint,7,opt,name=Port,proto3" json:"Port,omitempty"`
	SocketPath string `protobuf:"bytes,17,opt,name=SocketPath,proto3" json:"SocketPath,omitempty"`
	// mog: func-to=WeightsPtrToStructs func-from=NewWeightsPtrFromStructs
	Weights           *Weights `protobuf:"bytes,8,opt,name=Weights,proto3" json:"Weights,omitempty"`
	EnableTagOverride bool     `protobuf:"varint,9,opt,name=EnableTagOverride,proto3" json:"EnableTagOverride,omitempty"`
	// Proxy is the configuration set for Kind = connect-proxy. It is mandatory in
	// that case and an error to be set for any other kind. This config is part of
	// a proxy service definition and is distinct from but shares some fields with
	// the Connect.Proxy which configures a managed proxy as part of the actual
	// service's definition. This duplication is ugly but seemed better than the
	// alternative which was to re-use the same struct fields for both cases even
	// though the semantics are different and the non-shred fields make no sense
	// in the other case. ProxyConfig may be a more natural name here, but it's
	// confusing for the UX because one of the fields in ConnectProxyConfig is
	// also called just "Config"
	Proxy *ConnectProxyConfig `protobuf:"bytes,11,opt,name=Proxy,proto3" json:"Proxy,omitempty"`
	// Connect are the Connect settings for a service. This is purposely NOT
	// a pointer so that we never have to nil-check this.
	Connect *ServiceConnect `protobuf:"bytes,12,opt,name=Connect,proto3" json:"Connect,omitempty"`
	// LocallyRegisteredAsSidecar is private as it is only used by a local agent
	// state to track if the service was registered from a nested sidecar_service
	// block. We need to track that so we can know whether we need to deregister
	// it automatically too if it's removed from the service definition or if the
	// parent service is deregistered. Relying only on ID would cause us to
	// deregister regular services if they happen to be registered using the same
	// ID scheme as our sidecars do by default. We could use meta but that gets
	// unpleasant because we can't use the consul- prefix from an agent (reserved
	// for use internally but in practice that means within the state store or in
	// responses only), and it leaks the detail publicly which people might rely
	// on which is a bit unpleasant for something that is meant to be config-file
	// syntax sugar. Note this is not translated to ServiceNode and friends and
	// may not be set on a NodeService that isn't the one the agent registered and
	// keeps in it's local state. We never want this rendered in JSON as it's
	// internal only. Right now our agent endpoints return api structs which don't
	// include it but this is a safety net incase we change that or there is
	// somewhere this is used in API output.
	LocallyRegisteredAsSidecar bool `protobuf:"varint,13,opt,name=LocallyRegisteredAsSidecar,proto3" json:"LocallyRegisteredAsSidecar,omitempty"`
	// mog: func-to=EnterpriseMetaToStructs func-from=NewEnterpriseMetaFromStructs
	EnterpriseMeta *pbcommon.EnterpriseMeta `protobuf:"bytes,16,opt,name=EnterpriseMeta,proto3" json:"EnterpriseMeta,omitempty"`
	PeerName       string                   `protobuf:"bytes,18,opt,name=PeerName,proto3" json:"PeerName,omitempty"`
	// mog: func-to=RaftIndexToStructs func-from=NewRaftIndexFromStructs
	RaftIndex *pbcommon.RaftIndex `protobuf:"bytes,14,opt,name=RaftIndex,proto3" json:"RaftIndex,omitempty"`
	// contains filtered or unexported fields
}

NodeService is a service provided by a node

mog annotation:

target=github.com/hashicorp/consul/agent/structs.NodeService output=node.gen.go name=Structs

func (*NodeService) Descriptor deprecated

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

Deprecated: Use NodeService.ProtoReflect.Descriptor instead.

func (*NodeService) GetAddress added in v1.12.0

func (x *NodeService) GetAddress() string

func (*NodeService) GetConnect added in v1.12.0

func (x *NodeService) GetConnect() *ServiceConnect

func (*NodeService) GetEnableTagOverride added in v1.12.0

func (x *NodeService) GetEnableTagOverride() bool

func (*NodeService) GetEnterpriseMeta added in v1.12.0

func (x *NodeService) GetEnterpriseMeta() *pbcommon.EnterpriseMeta

func (*NodeService) GetID added in v1.12.0

func (x *NodeService) GetID() string

func (*NodeService) GetKind added in v1.12.0

func (x *NodeService) GetKind() string

func (*NodeService) GetLocallyRegisteredAsSidecar added in v1.12.0

func (x *NodeService) GetLocallyRegisteredAsSidecar() bool

func (*NodeService) GetMeta added in v1.12.0

func (x *NodeService) GetMeta() map[string]string

func (*NodeService) GetPeerName added in v1.13.0

func (x *NodeService) GetPeerName() string

func (*NodeService) GetPort added in v1.12.0

func (x *NodeService) GetPort() int32

func (*NodeService) GetProxy added in v1.12.0

func (x *NodeService) GetProxy() *ConnectProxyConfig

func (*NodeService) GetRaftIndex added in v1.12.0

func (x *NodeService) GetRaftIndex() *pbcommon.RaftIndex

func (*NodeService) GetService added in v1.12.0

func (x *NodeService) GetService() string

func (*NodeService) GetSocketPath added in v1.12.0

func (x *NodeService) GetSocketPath() string

func (*NodeService) GetTaggedAddresses added in v1.12.0

func (x *NodeService) GetTaggedAddresses() map[string]*ServiceAddress

func (*NodeService) GetTags added in v1.12.0

func (x *NodeService) GetTags() []string

func (*NodeService) GetWeights added in v1.12.0

func (x *NodeService) GetWeights() *Weights

func (*NodeService) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*NodeService) ProtoMessage

func (*NodeService) ProtoMessage()

func (*NodeService) ProtoReflect added in v1.12.0

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

func (*NodeService) Reset

func (x *NodeService) Reset()

func (*NodeService) String

func (x *NodeService) String() string

func (*NodeService) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

type PeeringServiceMeta added in v1.13.0

type PeeringServiceMeta struct {
	SNI      []string `protobuf:"bytes,1,rep,name=SNI,proto3" json:"SNI,omitempty"`
	SpiffeID []string `protobuf:"bytes,2,rep,name=SpiffeID,proto3" json:"SpiffeID,omitempty"`
	Protocol string   `protobuf:"bytes,3,opt,name=Protocol,proto3" json:"Protocol,omitempty"`
	// contains filtered or unexported fields
}

PeeringServiceMeta is read-only information provided from an exported peer.

mog annotation:

target=github.com/hashicorp/consul/agent/structs.PeeringServiceMeta output=service.gen.go name=Structs

func (*PeeringServiceMeta) Descriptor deprecated added in v1.13.0

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

Deprecated: Use PeeringServiceMeta.ProtoReflect.Descriptor instead.

func (*PeeringServiceMeta) GetProtocol added in v1.13.0

func (x *PeeringServiceMeta) GetProtocol() string

func (*PeeringServiceMeta) GetSNI added in v1.13.0

func (x *PeeringServiceMeta) GetSNI() []string

func (*PeeringServiceMeta) GetSpiffeID added in v1.13.0

func (x *PeeringServiceMeta) GetSpiffeID() []string

func (*PeeringServiceMeta) MarshalBinary added in v1.13.0

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

MarshalBinary implements encoding.BinaryMarshaler

func (*PeeringServiceMeta) ProtoMessage added in v1.13.0

func (*PeeringServiceMeta) ProtoMessage()

func (*PeeringServiceMeta) ProtoReflect added in v1.13.0

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

func (*PeeringServiceMeta) Reset added in v1.13.0

func (x *PeeringServiceMeta) Reset()

func (*PeeringServiceMeta) String added in v1.13.0

func (x *PeeringServiceMeta) String() string

func (*PeeringServiceMeta) UnmarshalBinary added in v1.13.0

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

type ServiceAddress

type ServiceAddress struct {
	Address string `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"`
	// mog: func-to=int func-from=int32
	Port int32 `protobuf:"varint,2,opt,name=Port,proto3" json:"Port,omitempty"`
	// contains filtered or unexported fields
}

Type to hold an address and port of a service

func (*ServiceAddress) Descriptor deprecated

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

Deprecated: Use ServiceAddress.ProtoReflect.Descriptor instead.

func (*ServiceAddress) GetAddress added in v1.12.0

func (x *ServiceAddress) GetAddress() string

func (*ServiceAddress) GetPort added in v1.12.0

func (x *ServiceAddress) GetPort() int32

func (*ServiceAddress) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*ServiceAddress) ProtoMessage

func (*ServiceAddress) ProtoMessage()

func (*ServiceAddress) ProtoReflect added in v1.12.0

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

func (*ServiceAddress) Reset

func (x *ServiceAddress) Reset()

func (*ServiceAddress) String

func (x *ServiceAddress) String() string

func (*ServiceAddress) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

type ServiceConnect

type ServiceConnect struct {

	// Native is true when this service can natively understand Connect.
	Native bool `protobuf:"varint,1,opt,name=Native,proto3" json:"Native,omitempty"`
	// SidecarService is a nested Service Definition to register at the same time.
	// It's purely a convenience mechanism to allow specifying a sidecar service
	// along with the application service definition. It's nested nature allows
	// all of the fields to be defaulted which can reduce the amount of
	// boilerplate needed to register a sidecar service separately, but the end
	// result is identical to just making a second service registration via any
	// other means.
	// mog: func-to=ServiceDefinitionPtrToStructs func-from=NewServiceDefinitionPtrFromStructs
	SidecarService *ServiceDefinition  `protobuf:"bytes,3,opt,name=SidecarService,proto3" json:"SidecarService,omitempty"`
	PeerMeta       *PeeringServiceMeta `protobuf:"bytes,4,opt,name=PeerMeta,proto3" json:"PeerMeta,omitempty"`
	// contains filtered or unexported fields
}

ServiceConnect are the shared Connect settings between all service definitions from the agent to the state store. mog annotation:

target=github.com/hashicorp/consul/agent/structs.ServiceConnect output=service.gen.go name=Structs

func NewServiceConnectPtrFromStructs

func NewServiceConnectPtrFromStructs(t *structs.ServiceConnect) *ServiceConnect

TODO: handle this with mog

func (*ServiceConnect) Descriptor deprecated

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

Deprecated: Use ServiceConnect.ProtoReflect.Descriptor instead.

func (*ServiceConnect) GetNative added in v1.12.0

func (x *ServiceConnect) GetNative() bool

func (*ServiceConnect) GetPeerMeta added in v1.13.0

func (x *ServiceConnect) GetPeerMeta() *PeeringServiceMeta

func (*ServiceConnect) GetSidecarService added in v1.12.0

func (x *ServiceConnect) GetSidecarService() *ServiceDefinition

func (*ServiceConnect) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*ServiceConnect) ProtoMessage

func (*ServiceConnect) ProtoMessage()

func (*ServiceConnect) ProtoReflect added in v1.12.0

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

func (*ServiceConnect) Reset

func (x *ServiceConnect) Reset()

func (*ServiceConnect) String

func (x *ServiceConnect) String() string

func (*ServiceConnect) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

type ServiceDefinition

type ServiceDefinition struct {

	// mog: func-to=structs.ServiceKind func-from=string
	Kind    string   `protobuf:"bytes,1,opt,name=Kind,proto3" json:"Kind,omitempty"`
	ID      string   `protobuf:"bytes,2,opt,name=ID,proto3" json:"ID,omitempty"`
	Name    string   `protobuf:"bytes,3,opt,name=Name,proto3" json:"Name,omitempty"`
	Tags    []string `protobuf:"bytes,4,rep,name=Tags,proto3" json:"Tags,omitempty"`
	Address string   `protobuf:"bytes,5,opt,name=Address,proto3" json:"Address,omitempty"`
	// mog: func-to=MapStringServiceAddressToStructs func-from=NewMapStringServiceAddressFromStructs
	TaggedAddresses map[string]*ServiceAddress `` /* 172-byte string literal not displayed */
	Meta            map[string]string          `` /* 149-byte string literal not displayed */
	// mog: func-to=int func-from=int32
	Port int32 `protobuf:"varint,7,opt,name=Port,proto3" json:"Port,omitempty"`
	// Path for socket
	SocketPath string     `protobuf:"bytes,18,opt,name=SocketPath,proto3" json:"SocketPath,omitempty"`
	Check      *CheckType `protobuf:"bytes,8,opt,name=Check,proto3" json:"Check,omitempty"`
	// mog: func-to=CheckTypesToStructs func-from=NewCheckTypesFromStructs
	Checks []*CheckType `protobuf:"bytes,9,rep,name=Checks,proto3" json:"Checks,omitempty"`
	// mog: func-to=WeightsPtrToStructs func-from=NewWeightsPtrFromStructs
	Weights           *Weights `protobuf:"bytes,10,opt,name=Weights,proto3" json:"Weights,omitempty"`
	Token             string   `protobuf:"bytes,11,opt,name=Token,proto3" json:"Token,omitempty"`
	EnableTagOverride bool     `protobuf:"varint,12,opt,name=EnableTagOverride,proto3" json:"EnableTagOverride,omitempty"`
	// Proxy is the configuration set for Kind = connect-proxy. It is mandatory in
	// that case and an error to be set for any other kind. This config is part of
	// a proxy service definition and is distinct from but shares some fields with
	// the Connect.Proxy which configures a managed proxy as part of the actual
	// service's definition. This duplication is ugly but seemed better than the
	// alternative which was to re-use the same struct fields for both cases even
	// though the semantics are different and the non-shared fields make no sense
	// in the other case. ProxyConfig may be a more natural name here, but it's
	// confusing for the UX because one of the fields in ConnectProxyConfig is
	// also called just "Config"
	// mog: func-to=ConnectProxyConfigPtrToStructs func-from=NewConnectProxyConfigPtrFromStructs
	Proxy *ConnectProxyConfig `protobuf:"bytes,14,opt,name=Proxy,proto3" json:"Proxy,omitempty"`
	// mog: func-to=EnterpriseMetaToStructs func-from=NewEnterpriseMetaFromStructs
	EnterpriseMeta *pbcommon.EnterpriseMeta `protobuf:"bytes,17,opt,name=EnterpriseMeta,proto3" json:"EnterpriseMeta,omitempty"`
	// mog: func-to=ServiceConnectPtrToStructs func-from=NewServiceConnectPtrFromStructs
	Connect *ServiceConnect `protobuf:"bytes,15,opt,name=Connect,proto3" json:"Connect,omitempty"`
	// contains filtered or unexported fields
}

ServiceDefinition is used to JSON decode the Service definitions. For documentation on specific fields see NodeService which is better documented.

mog annotation:

target=github.com/hashicorp/consul/agent/structs.ServiceDefinition output=service.gen.go name=Structs

func NewServiceDefinitionPtrFromStructs

func NewServiceDefinitionPtrFromStructs(t *structs.ServiceDefinition) *ServiceDefinition

TODO: handle this with mog

func (*ServiceDefinition) Descriptor deprecated

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

Deprecated: Use ServiceDefinition.ProtoReflect.Descriptor instead.

func (*ServiceDefinition) GetAddress added in v1.12.0

func (x *ServiceDefinition) GetAddress() string

func (*ServiceDefinition) GetCheck added in v1.12.0

func (x *ServiceDefinition) GetCheck() *CheckType

func (*ServiceDefinition) GetChecks added in v1.12.0

func (x *ServiceDefinition) GetChecks() []*CheckType

func (*ServiceDefinition) GetConnect added in v1.12.0

func (x *ServiceDefinition) GetConnect() *ServiceConnect

func (*ServiceDefinition) GetEnableTagOverride added in v1.12.0

func (x *ServiceDefinition) GetEnableTagOverride() bool

func (*ServiceDefinition) GetEnterpriseMeta added in v1.12.0

func (x *ServiceDefinition) GetEnterpriseMeta() *pbcommon.EnterpriseMeta

func (*ServiceDefinition) GetID added in v1.12.0

func (x *ServiceDefinition) GetID() string

func (*ServiceDefinition) GetKind added in v1.12.0

func (x *ServiceDefinition) GetKind() string

func (*ServiceDefinition) GetMeta added in v1.12.0

func (x *ServiceDefinition) GetMeta() map[string]string

func (*ServiceDefinition) GetName added in v1.12.0

func (x *ServiceDefinition) GetName() string

func (*ServiceDefinition) GetPort added in v1.12.0

func (x *ServiceDefinition) GetPort() int32

func (*ServiceDefinition) GetProxy added in v1.12.0

func (x *ServiceDefinition) GetProxy() *ConnectProxyConfig

func (*ServiceDefinition) GetSocketPath added in v1.12.0

func (x *ServiceDefinition) GetSocketPath() string

func (*ServiceDefinition) GetTaggedAddresses added in v1.12.0

func (x *ServiceDefinition) GetTaggedAddresses() map[string]*ServiceAddress

func (*ServiceDefinition) GetTags added in v1.12.0

func (x *ServiceDefinition) GetTags() []string

func (*ServiceDefinition) GetToken added in v1.12.0

func (x *ServiceDefinition) GetToken() string

func (*ServiceDefinition) GetWeights added in v1.12.0

func (x *ServiceDefinition) GetWeights() *Weights

func (*ServiceDefinition) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*ServiceDefinition) ProtoMessage

func (*ServiceDefinition) ProtoMessage()

func (*ServiceDefinition) ProtoReflect added in v1.12.0

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

func (*ServiceDefinition) Reset

func (x *ServiceDefinition) Reset()

func (*ServiceDefinition) String

func (x *ServiceDefinition) String() string

func (*ServiceDefinition) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

type TransparentProxyConfig added in v1.10.0

type TransparentProxyConfig struct {

	// mog: func-to=int func-from=int32
	OutboundListenerPort int32 `protobuf:"varint,1,opt,name=OutboundListenerPort,proto3" json:"OutboundListenerPort,omitempty"`
	// DialedDirectly indicates whether transparent proxies can dial this proxy instance directly.
	// The discovery chain is not considered when dialing a service instance directly.
	// This setting is useful when addressing stateful services, such as a database cluster with a leader node.
	DialedDirectly bool `protobuf:"varint,2,opt,name=DialedDirectly,proto3" json:"DialedDirectly,omitempty"`
	// contains filtered or unexported fields
}

mog annotation:

target=github.com/hashicorp/consul/agent/structs.TransparentProxyConfig output=service.gen.go name=Structs

func (*TransparentProxyConfig) Descriptor deprecated added in v1.10.0

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

Deprecated: Use TransparentProxyConfig.ProtoReflect.Descriptor instead.

func (*TransparentProxyConfig) GetDialedDirectly added in v1.12.0

func (x *TransparentProxyConfig) GetDialedDirectly() bool

func (*TransparentProxyConfig) GetOutboundListenerPort added in v1.12.0

func (x *TransparentProxyConfig) GetOutboundListenerPort() int32

func (*TransparentProxyConfig) MarshalBinary added in v1.10.0

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

MarshalBinary implements encoding.BinaryMarshaler

func (*TransparentProxyConfig) ProtoMessage added in v1.10.0

func (*TransparentProxyConfig) ProtoMessage()

func (*TransparentProxyConfig) ProtoReflect added in v1.12.0

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

func (*TransparentProxyConfig) Reset added in v1.10.0

func (x *TransparentProxyConfig) Reset()

func (*TransparentProxyConfig) String added in v1.10.0

func (x *TransparentProxyConfig) String() string

func (*TransparentProxyConfig) UnmarshalBinary added in v1.10.0

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

type Upstream

type Upstream struct {

	// Destination fields are the required ones for determining what this upstream
	// points to. Depending on DestinationType some other fields below might
	// further restrict the set of instances allowable.
	//
	// DestinationType would be better as an int constant but even with custom
	// JSON marshallers it causes havoc with all the mapstructure mangling we do
	// on service definitions in various places.
	DestinationType      string `protobuf:"bytes,1,opt,name=DestinationType,proto3" json:"DestinationType,omitempty"`
	DestinationNamespace string `protobuf:"bytes,2,opt,name=DestinationNamespace,proto3" json:"DestinationNamespace,omitempty"`
	DestinationPartition string `protobuf:"bytes,12,opt,name=DestinationPartition,proto3" json:"DestinationPartition,omitempty"`
	DestinationPeer      string `protobuf:"bytes,13,opt,name=DestinationPeer,proto3" json:"DestinationPeer,omitempty"`
	DestinationName      string `protobuf:"bytes,3,opt,name=DestinationName,proto3" json:"DestinationName,omitempty"`
	// Datacenter that the service discovery request should be run against. Note
	// for prepared queries, the actual results might be from a different
	// datacenter.
	Datacenter string `protobuf:"bytes,4,opt,name=Datacenter,proto3" json:"Datacenter,omitempty"`
	// LocalBindAddress is the ip address a side-car proxy should listen on for
	// traffic destined for this upstream service. Default if empty is 127.0.0.1.
	LocalBindAddress string `protobuf:"bytes,5,opt,name=LocalBindAddress,proto3" json:"LocalBindAddress,omitempty"`
	// LocalBindPort is the ip address a side-car proxy should listen on for
	// traffic destined for this upstream service. Required.
	// mog: func-to=int func-from=int32
	LocalBindPort int32 `protobuf:"varint,6,opt,name=LocalBindPort,proto3" json:"LocalBindPort,omitempty"`
	// Config is an opaque config that is specific to the proxy process being run.
	// It can be used to pass arbitrary configuration for this specific upstream
	// to the proxy.
	// mog: func-to=ProtobufTypesStructToMapStringInterface func-from=MapStringInterfaceToProtobufTypesStruct
	Config *structpb.Struct `protobuf:"bytes,7,opt,name=Config,proto3" json:"Config,omitempty"`
	// MeshGateway is the configuration for mesh gateway usage of this upstream
	MeshGateway *MeshGatewayConfig `protobuf:"bytes,8,opt,name=MeshGateway,proto3" json:"MeshGateway,omitempty"`
	// CentrallyConfigured indicates whether the upstream was defined in a proxy
	// instance registration or whether it was generated from a config entry.
	CentrallyConfigured bool `protobuf:"varint,9,opt,name=CentrallyConfigured,proto3" json:"CentrallyConfigured,omitempty"`
	// LocalBindSocketPath is the socket to create to connect to the upstream service
	LocalBindSocketPath string `protobuf:"bytes,10,opt,name=LocalBindSocketPath,proto3" json:"LocalBindSocketPath,omitempty"`
	LocalBindSocketMode string `protobuf:"bytes,11,opt,name=LocalBindSocketMode,proto3" json:"LocalBindSocketMode,omitempty"`
	// contains filtered or unexported fields
}

Upstream represents a single upstream dependency for a service or proxy. It describes the mechanism used to discover instances to communicate with (the Target) as well as any potential client configuration that may be useful such as load balancer options, timeouts etc.

mog annotation:

target=github.com/hashicorp/consul/agent/structs.Upstream output=service.gen.go name=Structs ignore-fields=IngressHosts

func NewUpstreamsFromStructs

func NewUpstreamsFromStructs(t structs.Upstreams) []*Upstream

TODO: handle this with mog

func (*Upstream) Descriptor deprecated

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

Deprecated: Use Upstream.ProtoReflect.Descriptor instead.

func (*Upstream) GetCentrallyConfigured added in v1.12.0

func (x *Upstream) GetCentrallyConfigured() bool

func (*Upstream) GetConfig added in v1.12.0

func (x *Upstream) GetConfig() *structpb.Struct

func (*Upstream) GetDatacenter added in v1.12.0

func (x *Upstream) GetDatacenter() string

func (*Upstream) GetDestinationName added in v1.12.0

func (x *Upstream) GetDestinationName() string

func (*Upstream) GetDestinationNamespace added in v1.12.0

func (x *Upstream) GetDestinationNamespace() string

func (*Upstream) GetDestinationPartition added in v1.12.0

func (x *Upstream) GetDestinationPartition() string

func (*Upstream) GetDestinationPeer added in v1.13.0

func (x *Upstream) GetDestinationPeer() string

func (*Upstream) GetDestinationType added in v1.12.0

func (x *Upstream) GetDestinationType() string

func (*Upstream) GetLocalBindAddress added in v1.12.0

func (x *Upstream) GetLocalBindAddress() string

func (*Upstream) GetLocalBindPort added in v1.12.0

func (x *Upstream) GetLocalBindPort() int32

func (*Upstream) GetLocalBindSocketMode added in v1.12.0

func (x *Upstream) GetLocalBindSocketMode() string

func (*Upstream) GetLocalBindSocketPath added in v1.12.0

func (x *Upstream) GetLocalBindSocketPath() string

func (*Upstream) GetMeshGateway added in v1.12.0

func (x *Upstream) GetMeshGateway() *MeshGatewayConfig

func (*Upstream) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*Upstream) ProtoMessage

func (*Upstream) ProtoMessage()

func (*Upstream) ProtoReflect added in v1.12.0

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

func (*Upstream) Reset

func (x *Upstream) Reset()

func (*Upstream) String

func (x *Upstream) String() string

func (*Upstream) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

type Weights

type Weights struct {

	// mog: func-to=int func-from=int32
	Passing int32 `protobuf:"varint,1,opt,name=Passing,proto3" json:"Passing,omitempty"`
	// mog: func-to=int func-from=int32
	Warning int32 `protobuf:"varint,2,opt,name=Warning,proto3" json:"Warning,omitempty"`
	// contains filtered or unexported fields
}

Weights represent the weight used by DNS for a given status

func NewWeightsPtrFromStructs

func NewWeightsPtrFromStructs(t *structs.Weights) *Weights

TODO: handle this with mog, once mog handles pointers

func (*Weights) Descriptor deprecated

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

Deprecated: Use Weights.ProtoReflect.Descriptor instead.

func (*Weights) GetPassing added in v1.12.0

func (x *Weights) GetPassing() int32

func (*Weights) GetWarning added in v1.12.0

func (x *Weights) GetWarning() int32

func (*Weights) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*Weights) ProtoMessage

func (*Weights) ProtoMessage()

func (*Weights) ProtoReflect added in v1.12.0

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

func (*Weights) Reset

func (x *Weights) Reset()

func (*Weights) String

func (x *Weights) String() string

func (*Weights) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

Jump to

Keyboard shortcuts

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