pbservice

package
v1.16.108 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnvoyExtensionsFromStructs = pbcommon.EnvoyExtensionsFromStructs
View Source
var EnvoyExtensionsToStructs = pbcommon.EnvoyExtensionsToStructs

Function variables to support proto generation This allows for using functions in the local package without having to generate imports

View Source
var File_private_pbservice_healthcheck_proto protoreflect.FileDescriptor
View Source
var File_private_pbservice_node_proto protoreflect.FileDescriptor
View Source
var File_private_pbservice_service_proto protoreflect.FileDescriptor
View Source
var MapStringInterfaceToProtobufTypesStruct = pbcommon.MapStringInterfaceToProtobufTypesStruct
View Source
var ProtobufTypesStructToMapStringInterface = pbcommon.ProtobufTypesStructToMapStringInterface

Functions

func AccessLogsConfigFromStructs

func AccessLogsConfigFromStructs(t *structs.AccessLogsConfig, s *AccessLogsConfig)

func AccessLogsConfigToStructs

func AccessLogsConfigToStructs(s *AccessLogsConfig, t *structs.AccessLogsConfig)

func CheckServiceNodeToStructs

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

TODO: use mog once it supports pointers and slices

func CheckTypeFromStructs

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

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

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

func ExposeConfigToStructs

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

func ExposePathFromStructs

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

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

func HealthCheckDefinitionToStructs

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

func HealthCheckFromStructs

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

func HealthCheckToStructs

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

func LocalityFromStructs

func LocalityFromStructs(l *structs.Locality) *pbcommon.Locality

TODO: handle this with mog

func LocalityToStructs

func LocalityToStructs(l *pbcommon.Locality) *structs.Locality

TODO: handle this with mog

func MapHeadersToStructs

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

func MapStringServiceAddressToStructs

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

TODO: handle this with mog

func MeshGatewayConfigFromStructs

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

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

func NodeServiceFromStructs

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

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

func PeeringServiceMetaToStructs

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

func RaftIndexToStructs

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

func ServiceConnectFromStructs

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

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 TransparentProxyConfigFromStructs

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

func TransparentProxyConfigToStructs

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

func UpstreamFromStructs

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 AccessLogsConfig

type AccessLogsConfig struct {
	Enabled             bool `protobuf:"varint,1,opt,name=Enabled,proto3" json:"Enabled,omitempty"`
	DisableListenerLogs bool `protobuf:"varint,2,opt,name=DisableListenerLogs,proto3" json:"DisableListenerLogs,omitempty"`
	// Type represents the desired envoy log sink (e.g. stdout, stderr, file ...).
	// mog: func-to=structs.LogSinkType func-from=string
	Type       string `protobuf:"bytes,3,opt,name=Type,proto3" json:"Type,omitempty"`
	Path       string `protobuf:"bytes,4,opt,name=Path,proto3" json:"Path,omitempty"`
	JSONFormat string `protobuf:"bytes,5,opt,name=JSONFormat,proto3" json:"JSONFormat,omitempty"`
	TextFormat string `protobuf:"bytes,6,opt,name=TextFormat,proto3" json:"TextFormat,omitempty"`
	// contains filtered or unexported fields
}

mog annotation:

target=github.com/hernad/consul/agent/structs.AccessLogsConfig output=service.gen.go name=Structs

func (*AccessLogsConfig) Descriptor deprecated

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

Deprecated: Use AccessLogsConfig.ProtoReflect.Descriptor instead.

func (*AccessLogsConfig) GetDisableListenerLogs

func (x *AccessLogsConfig) GetDisableListenerLogs() bool

func (*AccessLogsConfig) GetEnabled

func (x *AccessLogsConfig) GetEnabled() bool

func (*AccessLogsConfig) GetJSONFormat

func (x *AccessLogsConfig) GetJSONFormat() string

func (*AccessLogsConfig) GetPath

func (x *AccessLogsConfig) GetPath() string

func (*AccessLogsConfig) GetTextFormat

func (x *AccessLogsConfig) GetTextFormat() string

func (*AccessLogsConfig) GetType

func (x *AccessLogsConfig) GetType() string

func (*AccessLogsConfig) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*AccessLogsConfig) ProtoMessage

func (*AccessLogsConfig) ProtoMessage()

func (*AccessLogsConfig) ProtoReflect

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

func (*AccessLogsConfig) Reset

func (x *AccessLogsConfig) Reset()

func (*AccessLogsConfig) String

func (x *AccessLogsConfig) String() string

func (*AccessLogsConfig) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

type CheckIDType

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

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

func (*CheckServiceNode) GetNode

func (x *CheckServiceNode) GetNode() *Node

func (*CheckServiceNode) GetService

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

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"`
	OSService        string                  `protobuf:"bytes,33,opt,name=OSService,proto3" json:"OSService,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/hernad/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

func (x *CheckType) GetAliasNode() string

func (*CheckType) GetAliasService

func (x *CheckType) GetAliasService() string

func (*CheckType) GetBody

func (x *CheckType) GetBody() string

func (*CheckType) GetCheckID

func (x *CheckType) GetCheckID() string

func (*CheckType) GetDeregisterCriticalServiceAfter

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

func (*CheckType) GetDisableRedirects

func (x *CheckType) GetDisableRedirects() bool

func (*CheckType) GetDockerContainerID

func (x *CheckType) GetDockerContainerID() string

func (*CheckType) GetFailuresBeforeCritical

func (x *CheckType) GetFailuresBeforeCritical() int32

func (*CheckType) GetFailuresBeforeWarning

func (x *CheckType) GetFailuresBeforeWarning() int32

func (*CheckType) GetGRPC

func (x *CheckType) GetGRPC() string

func (*CheckType) GetGRPCUseTLS

func (x *CheckType) GetGRPCUseTLS() bool

func (*CheckType) GetH2PING

func (x *CheckType) GetH2PING() string

func (*CheckType) GetH2PingUseTLS

func (x *CheckType) GetH2PingUseTLS() bool

func (*CheckType) GetHTTP

func (x *CheckType) GetHTTP() string

func (*CheckType) GetHeader

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

func (*CheckType) GetInterval

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

func (*CheckType) GetMethod

func (x *CheckType) GetMethod() string

func (*CheckType) GetName

func (x *CheckType) GetName() string

func (*CheckType) GetNotes

func (x *CheckType) GetNotes() string

func (*CheckType) GetOSService

func (x *CheckType) GetOSService() string

func (*CheckType) GetOutputMaxSize

func (x *CheckType) GetOutputMaxSize() int32

func (*CheckType) GetProxyGRPC

func (x *CheckType) GetProxyGRPC() string

func (*CheckType) GetProxyHTTP

func (x *CheckType) GetProxyHTTP() string

func (*CheckType) GetScriptArgs

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

func (*CheckType) GetShell

func (x *CheckType) GetShell() string

func (*CheckType) GetStatus

func (x *CheckType) GetStatus() string

func (*CheckType) GetSuccessBeforePassing

func (x *CheckType) GetSuccessBeforePassing() int32

func (*CheckType) GetTCP

func (x *CheckType) GetTCP() string

func (*CheckType) GetTLSServerName

func (x *CheckType) GetTLSServerName() string

func (*CheckType) GetTLSSkipVerify

func (x *CheckType) GetTLSSkipVerify() bool

func (*CheckType) GetTTL

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

func (*CheckType) GetTimeout

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

func (*CheckType) GetUDP

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

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"`
	// mog: func-to=EnvoyExtensionsToStructs func-from=EnvoyExtensionsFromStructs
	EnvoyExtensions []*pbcommon.EnvoyExtension `protobuf:"bytes,12,rep,name=EnvoyExtensions,proto3" json:"EnvoyExtensions,omitempty"`
	// AccessLogsConfig defines envoys access log configuration.
	AccessLogs *AccessLogsConfig `protobuf:"bytes,13,opt,name=AccessLogs,proto3" json:"AccessLogs,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/hernad/consul/agent/structs.ConnectProxyConfig output=service.gen.go name=Structs ignore-fields=MutualTLSMode

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) GetAccessLogs

func (x *ConnectProxyConfig) GetAccessLogs() *AccessLogsConfig

func (*ConnectProxyConfig) GetConfig

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

func (*ConnectProxyConfig) GetDestinationServiceID

func (x *ConnectProxyConfig) GetDestinationServiceID() string

func (*ConnectProxyConfig) GetDestinationServiceName

func (x *ConnectProxyConfig) GetDestinationServiceName() string

func (*ConnectProxyConfig) GetEnvoyExtensions

func (x *ConnectProxyConfig) GetEnvoyExtensions() []*pbcommon.EnvoyExtension

func (*ConnectProxyConfig) GetExpose

func (x *ConnectProxyConfig) GetExpose() *ExposeConfig

func (*ConnectProxyConfig) GetLocalServiceAddress

func (x *ConnectProxyConfig) GetLocalServiceAddress() string

func (*ConnectProxyConfig) GetLocalServicePort

func (x *ConnectProxyConfig) GetLocalServicePort() int32

func (*ConnectProxyConfig) GetLocalServiceSocketPath

func (x *ConnectProxyConfig) GetLocalServiceSocketPath() string

func (*ConnectProxyConfig) GetMeshGateway

func (x *ConnectProxyConfig) GetMeshGateway() *MeshGatewayConfig

func (*ConnectProxyConfig) GetMode

func (x *ConnectProxyConfig) GetMode() string

func (*ConnectProxyConfig) GetTransparentProxy

func (x *ConnectProxyConfig) GetTransparentProxy() *TransparentProxyConfig

func (*ConnectProxyConfig) GetUpstreams

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

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/hernad/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

func (x *ExposeConfig) GetChecks() bool

func (*ExposeConfig) GetPaths

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

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/hernad/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

func (x *ExposePath) GetListenerPort() int32

func (*ExposePath) GetLocalPathPort

func (x *ExposePath) GetLocalPathPort() int32

func (*ExposePath) GetParsedFromCheck

func (x *ExposePath) GetParsedFromCheck() bool

func (*ExposePath) GetPath

func (x *ExposePath) GetPath() string

func (*ExposePath) GetProtocol

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

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

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

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/hernad/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

func (x *HealthCheck) GetCheckID() string

func (*HealthCheck) GetDefinition

func (x *HealthCheck) GetDefinition() *HealthCheckDefinition

func (*HealthCheck) GetEnterpriseMeta

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

func (*HealthCheck) GetExposedPort

func (x *HealthCheck) GetExposedPort() int32

func (*HealthCheck) GetInterval

func (x *HealthCheck) GetInterval() string

func (*HealthCheck) GetName

func (x *HealthCheck) GetName() string

func (*HealthCheck) GetNode

func (x *HealthCheck) GetNode() string

func (*HealthCheck) GetNotes

func (x *HealthCheck) GetNotes() string

func (*HealthCheck) GetOutput

func (x *HealthCheck) GetOutput() string

func (*HealthCheck) GetPeerName

func (x *HealthCheck) GetPeerName() string

func (*HealthCheck) GetRaftIndex

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

func (*HealthCheck) GetServiceID

func (x *HealthCheck) GetServiceID() string

func (*HealthCheck) GetServiceName

func (x *HealthCheck) GetServiceName() string

func (*HealthCheck) GetServiceTags

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

func (*HealthCheck) GetStatus

func (x *HealthCheck) GetStatus() string

func (*HealthCheck) GetTimeout

func (x *HealthCheck) GetTimeout() string

func (*HealthCheck) GetType

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

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"`
	OSService        string                  `protobuf:"bytes,24,opt,name=OSService,proto3" json:"OSService,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/hernad/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

func (x *HealthCheckDefinition) GetAliasNode() string

func (*HealthCheckDefinition) GetAliasService

func (x *HealthCheckDefinition) GetAliasService() string

func (*HealthCheckDefinition) GetBody

func (x *HealthCheckDefinition) GetBody() string

func (*HealthCheckDefinition) GetDeregisterCriticalServiceAfter

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

func (*HealthCheckDefinition) GetDisableRedirects

func (x *HealthCheckDefinition) GetDisableRedirects() bool

func (*HealthCheckDefinition) GetDockerContainerID

func (x *HealthCheckDefinition) GetDockerContainerID() string

func (*HealthCheckDefinition) GetGRPC

func (x *HealthCheckDefinition) GetGRPC() string

func (*HealthCheckDefinition) GetGRPCUseTLS

func (x *HealthCheckDefinition) GetGRPCUseTLS() bool

func (*HealthCheckDefinition) GetH2PING

func (x *HealthCheckDefinition) GetH2PING() string

func (*HealthCheckDefinition) GetH2PingUseTLS

func (x *HealthCheckDefinition) GetH2PingUseTLS() bool

func (*HealthCheckDefinition) GetHTTP

func (x *HealthCheckDefinition) GetHTTP() string

func (*HealthCheckDefinition) GetHeader

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

func (*HealthCheckDefinition) GetInterval

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

func (*HealthCheckDefinition) GetMethod

func (x *HealthCheckDefinition) GetMethod() string

func (*HealthCheckDefinition) GetOSService

func (x *HealthCheckDefinition) GetOSService() string

func (*HealthCheckDefinition) GetOutputMaxSize

func (x *HealthCheckDefinition) GetOutputMaxSize() uint32

func (*HealthCheckDefinition) GetScriptArgs

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

func (*HealthCheckDefinition) GetShell

func (x *HealthCheckDefinition) GetShell() string

func (*HealthCheckDefinition) GetTCP

func (x *HealthCheckDefinition) GetTCP() string

func (*HealthCheckDefinition) GetTLSServerName

func (x *HealthCheckDefinition) GetTLSServerName() string

func (*HealthCheckDefinition) GetTLSSkipVerify

func (x *HealthCheckDefinition) GetTLSSkipVerify() bool

func (*HealthCheckDefinition) GetTTL

func (*HealthCheckDefinition) GetTimeout

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

func (*HealthCheckDefinition) GetUDP

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

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

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) Descriptor deprecated

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

Deprecated: Use IndexedCheckServiceNodes.ProtoReflect.Descriptor instead.

func (*IndexedCheckServiceNodes) GetIndex

func (x *IndexedCheckServiceNodes) GetIndex() uint64

func (*IndexedCheckServiceNodes) GetNodes

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

func (*IndexedCheckServiceNodes) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*IndexedCheckServiceNodes) ProtoMessage

func (*IndexedCheckServiceNodes) ProtoMessage()

func (*IndexedCheckServiceNodes) ProtoReflect

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

func (*IndexedCheckServiceNodes) Reset

func (x *IndexedCheckServiceNodes) Reset()

func (*IndexedCheckServiceNodes) String

func (x *IndexedCheckServiceNodes) String() string

func (*IndexedCheckServiceNodes) UnmarshalBinary

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/hernad/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

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

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"`
	// Locality identifies where the node is running.
	// mog: func-to=LocalityToStructs func-from=LocalityFromStructs
	Locality *pbcommon.Locality `protobuf:"bytes,10,opt,name=Locality,proto3" json:"Locality,omitempty"`
	// contains filtered or unexported fields
}

Node contains information about a node.

mog annotation:

target=github.com/hernad/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

func (x *Node) GetAddress() string

func (*Node) GetDatacenter

func (x *Node) GetDatacenter() string

func (*Node) GetID

func (x *Node) GetID() string

func (*Node) GetLocality

func (x *Node) GetLocality() *pbcommon.Locality

func (*Node) GetMeta

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

func (*Node) GetNode

func (x *Node) GetNode() string

func (*Node) GetPartition

func (x *Node) GetPartition() string

func (*Node) GetPeerName

func (x *Node) GetPeerName() string

func (*Node) GetRaftIndex

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

func (*Node) GetTaggedAddresses

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

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

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"`
	// Locality identifies where the service is running.
	// mog: func-to=LocalityToStructs func-from=LocalityFromStructs
	Locality *pbcommon.Locality `protobuf:"bytes,19,opt,name=Locality,proto3" json:"Locality,omitempty"`
	// contains filtered or unexported fields
}

NodeService is a service provided by a node

mog annotation:

target=github.com/hernad/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

func (x *NodeService) GetAddress() string

func (*NodeService) GetConnect

func (x *NodeService) GetConnect() *ServiceConnect

func (*NodeService) GetEnableTagOverride

func (x *NodeService) GetEnableTagOverride() bool

func (*NodeService) GetEnterpriseMeta

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

func (*NodeService) GetID

func (x *NodeService) GetID() string

func (*NodeService) GetKind

func (x *NodeService) GetKind() string

func (*NodeService) GetLocality

func (x *NodeService) GetLocality() *pbcommon.Locality

func (*NodeService) GetLocallyRegisteredAsSidecar

func (x *NodeService) GetLocallyRegisteredAsSidecar() bool

func (*NodeService) GetMeta

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

func (*NodeService) GetPeerName

func (x *NodeService) GetPeerName() string

func (*NodeService) GetPort

func (x *NodeService) GetPort() int32

func (*NodeService) GetProxy

func (x *NodeService) GetProxy() *ConnectProxyConfig

func (*NodeService) GetRaftIndex

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

func (*NodeService) GetService

func (x *NodeService) GetService() string

func (*NodeService) GetSocketPath

func (x *NodeService) GetSocketPath() string

func (*NodeService) GetTaggedAddresses

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

func (*NodeService) GetTags

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

func (*NodeService) GetWeights

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

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

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/hernad/consul/agent/structs.PeeringServiceMeta output=service.gen.go name=Structs

func (*PeeringServiceMeta) Descriptor deprecated

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

Deprecated: Use PeeringServiceMeta.ProtoReflect.Descriptor instead.

func (*PeeringServiceMeta) GetProtocol

func (x *PeeringServiceMeta) GetProtocol() string

func (*PeeringServiceMeta) GetSNI

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

func (*PeeringServiceMeta) GetSpiffeID

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

func (*PeeringServiceMeta) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*PeeringServiceMeta) ProtoMessage

func (*PeeringServiceMeta) ProtoMessage()

func (*PeeringServiceMeta) ProtoReflect

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

func (*PeeringServiceMeta) Reset

func (x *PeeringServiceMeta) Reset()

func (*PeeringServiceMeta) String

func (x *PeeringServiceMeta) String() string

func (*PeeringServiceMeta) UnmarshalBinary

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

func (x *ServiceAddress) GetAddress() string

func (*ServiceAddress) GetPort

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

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/hernad/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

func (x *ServiceConnect) GetNative() bool

func (*ServiceConnect) GetPeerMeta

func (x *ServiceConnect) GetPeerMeta() *PeeringServiceMeta

func (*ServiceConnect) GetSidecarService

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

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"`
	// Locality identifies where the service is running.
	// mog: func-to=LocalityToStructs func-from=LocalityFromStructs
	Locality *pbcommon.Locality `protobuf:"bytes,19,opt,name=Locality,proto3" json:"Locality,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/hernad/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

func (x *ServiceDefinition) GetAddress() string

func (*ServiceDefinition) GetCheck

func (x *ServiceDefinition) GetCheck() *CheckType

func (*ServiceDefinition) GetChecks

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

func (*ServiceDefinition) GetConnect

func (x *ServiceDefinition) GetConnect() *ServiceConnect

func (*ServiceDefinition) GetEnableTagOverride

func (x *ServiceDefinition) GetEnableTagOverride() bool

func (*ServiceDefinition) GetEnterpriseMeta

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

func (*ServiceDefinition) GetID

func (x *ServiceDefinition) GetID() string

func (*ServiceDefinition) GetKind

func (x *ServiceDefinition) GetKind() string

func (*ServiceDefinition) GetLocality

func (x *ServiceDefinition) GetLocality() *pbcommon.Locality

func (*ServiceDefinition) GetMeta

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

func (*ServiceDefinition) GetName

func (x *ServiceDefinition) GetName() string

func (*ServiceDefinition) GetPort

func (x *ServiceDefinition) GetPort() int32

func (*ServiceDefinition) GetProxy

func (x *ServiceDefinition) GetProxy() *ConnectProxyConfig

func (*ServiceDefinition) GetSocketPath

func (x *ServiceDefinition) GetSocketPath() string

func (*ServiceDefinition) GetTaggedAddresses

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

func (*ServiceDefinition) GetTags

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

func (*ServiceDefinition) GetToken

func (x *ServiceDefinition) GetToken() string

func (*ServiceDefinition) GetWeights

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

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

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/hernad/consul/agent/structs.TransparentProxyConfig output=service.gen.go name=Structs

func (*TransparentProxyConfig) Descriptor deprecated

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

Deprecated: Use TransparentProxyConfig.ProtoReflect.Descriptor instead.

func (*TransparentProxyConfig) GetDialedDirectly

func (x *TransparentProxyConfig) GetDialedDirectly() bool

func (*TransparentProxyConfig) GetOutboundListenerPort

func (x *TransparentProxyConfig) GetOutboundListenerPort() int32

func (*TransparentProxyConfig) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*TransparentProxyConfig) ProtoMessage

func (*TransparentProxyConfig) ProtoMessage()

func (*TransparentProxyConfig) ProtoReflect

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

func (*TransparentProxyConfig) Reset

func (x *TransparentProxyConfig) Reset()

func (*TransparentProxyConfig) String

func (x *TransparentProxyConfig) String() string

func (*TransparentProxyConfig) UnmarshalBinary

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/hernad/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

func (x *Upstream) GetCentrallyConfigured() bool

func (*Upstream) GetConfig

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

func (*Upstream) GetDatacenter

func (x *Upstream) GetDatacenter() string

func (*Upstream) GetDestinationName

func (x *Upstream) GetDestinationName() string

func (*Upstream) GetDestinationNamespace

func (x *Upstream) GetDestinationNamespace() string

func (*Upstream) GetDestinationPartition

func (x *Upstream) GetDestinationPartition() string

func (*Upstream) GetDestinationPeer

func (x *Upstream) GetDestinationPeer() string

func (*Upstream) GetDestinationType

func (x *Upstream) GetDestinationType() string

func (*Upstream) GetLocalBindAddress

func (x *Upstream) GetLocalBindAddress() string

func (*Upstream) GetLocalBindPort

func (x *Upstream) GetLocalBindPort() int32

func (*Upstream) GetLocalBindSocketMode

func (x *Upstream) GetLocalBindSocketMode() string

func (*Upstream) GetLocalBindSocketPath

func (x *Upstream) GetLocalBindSocketPath() string

func (*Upstream) GetMeshGateway

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

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

func (x *Weights) GetPassing() int32

func (*Weights) GetWarning

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

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