pbservice

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthHealthcheck        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowHealthcheck          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupHealthcheck = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthNode        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowNode          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupNode = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthService        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowService          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group")
)

Functions

func CheckServiceNodeToStructs

func CheckServiceNodeToStructs(s *CheckServiceNode) *structs.CheckServiceNode

TODO: use mog once it supports pointers and slices

func CheckTypeToStructs

func CheckTypeToStructs(s CheckType) structs.CheckType

func CheckTypesToStructs

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

TODO: handle this with mog

func ConnectProxyConfigPtrToStructs

func ConnectProxyConfigPtrToStructs(s *ConnectProxyConfig) *structs.ConnectProxyConfig

TODO: handle this with mog

func ExposeConfigToStructs

func ExposeConfigToStructs(s ExposeConfig) structs.ExposeConfig

func ExposePathSliceToStructs

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

TODO: handle this with mog

func ExposePathToStructs

func ExposePathToStructs(s ExposePath) structs.ExposePath

func HealthCheckToStructs

func HealthCheckToStructs(s HealthCheck) 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 MeshGatewayConfigToStructs

func MeshGatewayConfigToStructs(s MeshGatewayConfig) structs.MeshGatewayConfig

func NewEnterpriseMetaFromStructs

func NewEnterpriseMetaFromStructs(_ structs.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 NodeServiceToStructs

func NodeServiceToStructs(s NodeService) structs.NodeService

func NodeToStructs

func NodeToStructs(s Node) structs.Node

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 ServiceConnectPtrToStructs

func ServiceConnectPtrToStructs(s *ServiceConnect) *structs.ServiceConnect

TODO: handle this with mog

func ServiceConnectToStructs

func ServiceConnectToStructs(s ServiceConnect) structs.ServiceConnect

func ServiceDefinitionPtrToStructs

func ServiceDefinitionPtrToStructs(s *ServiceDefinition) *structs.ServiceDefinition

TODO: handle this with mog

func ServiceDefinitionToStructs

func ServiceDefinitionToStructs(s ServiceDefinition) 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 TransparentProxyConfigToStructs added in v1.10.0

func TransparentProxyConfigToStructs(s TransparentProxyConfig) structs.TransparentProxyConfig

func UpstreamToStructs

func UpstreamToStructs(s Upstream) 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 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"`
}

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

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

func (*CheckServiceNode) Marshal

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

func (*CheckServiceNode) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*CheckServiceNode) MarshalTo

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

func (*CheckServiceNode) MarshalToSizedBuffer

func (m *CheckServiceNode) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CheckServiceNode) ProtoMessage

func (*CheckServiceNode) ProtoMessage()

func (*CheckServiceNode) Reset

func (m *CheckServiceNode) Reset()

func (*CheckServiceNode) Size

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

func (*CheckServiceNode) String

func (m *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) Unmarshal

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

func (*CheckServiceNode) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*CheckServiceNode) XXX_DiscardUnknown

func (m *CheckServiceNode) XXX_DiscardUnknown()

func (*CheckServiceNode) XXX_Marshal

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

func (*CheckServiceNode) XXX_Merge

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

func (*CheckServiceNode) XXX_Size

func (m *CheckServiceNode) XXX_Size() int

func (*CheckServiceNode) XXX_Unmarshal

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

type CheckType

type CheckType struct {
	CheckID    github_com_hashicorp_consul_types.CheckID `protobuf:"bytes,1,opt,name=CheckID,proto3,casttype=github.com/hashicorp/consul/types.CheckID" 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 `` /* 144-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"`
	TCP               string                 `protobuf:"bytes,8,opt,name=TCP,proto3" json:"TCP,omitempty"`
	Interval          time.Duration          `protobuf:"bytes,9,opt,name=Interval,proto3,stdduration" json:"Interval"`
	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"`
	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"`
	Timeout           time.Duration          `protobuf:"bytes,17,opt,name=Timeout,proto3,stdduration" json:"Timeout"`
	TTL               time.Duration          `protobuf:"bytes,18,opt,name=TTL,proto3,stdduration" json:"TTL"`
	// 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
	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.
	DeregisterCriticalServiceAfter time.Duration `protobuf:"bytes,19,opt,name=DeregisterCriticalServiceAfter,proto3,stdduration" json:"DeregisterCriticalServiceAfter"`
	// mog: func-to=int func-from=int32
	OutputMaxSize int32 `protobuf:"varint,25,opt,name=OutputMaxSize,proto3" json:"OutputMaxSize,omitempty"`
}

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 NewCheckTypeFromStructs

func NewCheckTypeFromStructs(t structs.CheckType) CheckType

func NewCheckTypesFromStructs

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

TODO: handle this with mog

func (*CheckType) Descriptor

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

func (*CheckType) Marshal

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

func (*CheckType) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*CheckType) MarshalTo

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

func (*CheckType) MarshalToSizedBuffer

func (m *CheckType) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CheckType) ProtoMessage

func (*CheckType) ProtoMessage()

func (*CheckType) Reset

func (m *CheckType) Reset()

func (*CheckType) Size

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

func (*CheckType) String

func (m *CheckType) String() string

func (*CheckType) Unmarshal

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

func (*CheckType) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*CheckType) XXX_DiscardUnknown

func (m *CheckType) XXX_DiscardUnknown()

func (*CheckType) XXX_Marshal

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

func (*CheckType) XXX_Merge

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

func (*CheckType) XXX_Size

func (m *CheckType) XXX_Size() int

func (*CheckType) XXX_Unmarshal

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

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 *types.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"`
	// MeshGateway defines the mesh gateway configuration for upstreams
	MeshGateway MeshGatewayConfig `protobuf:"bytes,7,opt,name=MeshGateway,proto3" json:"MeshGateway"`
	// Expose defines whether checks or paths are exposed through the proxy
	Expose ExposeConfig `protobuf:"bytes,8,opt,name=Expose,proto3" json:"Expose"`
	// Mode represents how the proxy's inbound and upstream listeners are dialed.
	Mode github_com_hashicorp_consul_agent_structs.ProxyMode `protobuf:"bytes,9,opt,name=Mode,proto3,casttype=github.com/hashicorp/consul/agent/structs.ProxyMode" 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"`
	// 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"`
}

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 NewConnectProxyConfigFromStructs

func NewConnectProxyConfigFromStructs(t structs.ConnectProxyConfig) ConnectProxyConfig

func NewConnectProxyConfigPtrFromStructs

func NewConnectProxyConfigPtrFromStructs(t *structs.ConnectProxyConfig) *ConnectProxyConfig

TODO: handle this with mog

func (*ConnectProxyConfig) Descriptor

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

func (*ConnectProxyConfig) Marshal

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

func (*ConnectProxyConfig) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*ConnectProxyConfig) MarshalTo

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

func (*ConnectProxyConfig) MarshalToSizedBuffer

func (m *ConnectProxyConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConnectProxyConfig) ProtoMessage

func (*ConnectProxyConfig) ProtoMessage()

func (*ConnectProxyConfig) Reset

func (m *ConnectProxyConfig) Reset()

func (*ConnectProxyConfig) Size

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

func (*ConnectProxyConfig) String

func (m *ConnectProxyConfig) String() string

func (*ConnectProxyConfig) Unmarshal

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

func (*ConnectProxyConfig) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*ConnectProxyConfig) XXX_DiscardUnknown

func (m *ConnectProxyConfig) XXX_DiscardUnknown()

func (*ConnectProxyConfig) XXX_Marshal

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

func (*ConnectProxyConfig) XXX_Merge

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

func (*ConnectProxyConfig) XXX_Size

func (m *ConnectProxyConfig) XXX_Size() int

func (*ConnectProxyConfig) XXX_Unmarshal

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

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"`
}

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 NewExposeConfigFromStructs

func NewExposeConfigFromStructs(t structs.ExposeConfig) ExposeConfig

func (*ExposeConfig) Descriptor

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

func (*ExposeConfig) Marshal

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

func (*ExposeConfig) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*ExposeConfig) MarshalTo

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

func (*ExposeConfig) MarshalToSizedBuffer

func (m *ExposeConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ExposeConfig) ProtoMessage

func (*ExposeConfig) ProtoMessage()

func (*ExposeConfig) Reset

func (m *ExposeConfig) Reset()

func (*ExposeConfig) Size

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

func (*ExposeConfig) String

func (m *ExposeConfig) String() string

func (*ExposeConfig) Unmarshal

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

func (*ExposeConfig) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*ExposeConfig) XXX_DiscardUnknown

func (m *ExposeConfig) XXX_DiscardUnknown()

func (*ExposeConfig) XXX_Marshal

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

func (*ExposeConfig) XXX_Merge

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

func (*ExposeConfig) XXX_Size

func (m *ExposeConfig) XXX_Size() int

func (*ExposeConfig) XXX_Unmarshal

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

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"`
}

mog annotation:

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

func NewExposePathFromStructs

func NewExposePathFromStructs(t structs.ExposePath) ExposePath

func NewExposePathSliceFromStructs

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

TODO: handle this with mog

func (*ExposePath) Descriptor

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

func (*ExposePath) Marshal

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

func (*ExposePath) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*ExposePath) MarshalTo

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

func (*ExposePath) MarshalToSizedBuffer

func (m *ExposePath) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ExposePath) ProtoMessage

func (*ExposePath) ProtoMessage()

func (*ExposePath) Reset

func (m *ExposePath) Reset()

func (*ExposePath) Size

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

func (*ExposePath) String

func (m *ExposePath) String() string

func (*ExposePath) Unmarshal

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

func (*ExposePath) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*ExposePath) XXX_DiscardUnknown

func (m *ExposePath) XXX_DiscardUnknown()

func (*ExposePath) XXX_Marshal

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

func (*ExposePath) XXX_Merge

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

func (*ExposePath) XXX_Size

func (m *ExposePath) XXX_Size() int

func (*ExposePath) XXX_Unmarshal

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

type HeaderValue

type HeaderValue struct {
	Value []string `protobuf:"bytes,1,rep,name=Value,proto3" json:"Value,omitempty"`
}

func (*HeaderValue) Descriptor

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

func (*HeaderValue) Marshal

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

func (*HeaderValue) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*HeaderValue) MarshalTo

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

func (*HeaderValue) MarshalToSizedBuffer

func (m *HeaderValue) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*HeaderValue) ProtoMessage

func (*HeaderValue) ProtoMessage()

func (*HeaderValue) Reset

func (m *HeaderValue) Reset()

func (*HeaderValue) Size

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

func (*HeaderValue) String

func (m *HeaderValue) String() string

func (*HeaderValue) Unmarshal

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

func (*HeaderValue) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*HeaderValue) XXX_DiscardUnknown

func (m *HeaderValue) XXX_DiscardUnknown()

func (*HeaderValue) XXX_Marshal

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

func (*HeaderValue) XXX_Merge

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

func (*HeaderValue) XXX_Size

func (m *HeaderValue) XXX_Size() int

func (*HeaderValue) XXX_Unmarshal

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

type HealthCheck

type HealthCheck struct {
	Node        string                                    `protobuf:"bytes,1,opt,name=Node,proto3" json:"Node,omitempty"`
	CheckID     github_com_hashicorp_consul_types.CheckID `protobuf:"bytes,2,opt,name=CheckID,proto3,casttype=github.com/hashicorp/consul/types.CheckID" 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"`
	Notes       string                                    `protobuf:"bytes,5,opt,name=Notes,proto3" json:"Notes,omitempty"`
	Output      string                                    `protobuf:"bytes,6,opt,name=Output,proto3" json:"Output,omitempty"`
	ServiceID   string                                    `protobuf:"bytes,7,opt,name=ServiceID,proto3" json:"ServiceID,omitempty"`
	ServiceName string                                    `protobuf:"bytes,8,opt,name=ServiceName,proto3" json:"ServiceName,omitempty"`
	ServiceTags []string                                  `protobuf:"bytes,9,rep,name=ServiceTags,proto3" json:"ServiceTags,omitempty"`
	Type        string                                    `protobuf:"bytes,12,opt,name=Type,proto3" json:"Type,omitempty"`
	Definition  HealthCheckDefinition                     `protobuf:"bytes,10,opt,name=Definition,proto3" json:"Definition"`
	// mog: func-to=RaftIndexToStructs func-from=NewRaftIndexFromStructs
	pbcommon.RaftIndex `protobuf:"bytes,11,opt,name=RaftIndex,proto3,embedded=RaftIndex" json:"RaftIndex"`
	// mog: func-to=EnterpriseMetaToStructs func-from=NewEnterpriseMetaFromStructs
	EnterpriseMeta pbcommon.EnterpriseMeta `protobuf:"bytes,13,opt,name=EnterpriseMeta,proto3" json:"EnterpriseMeta"`
	// 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"`
}

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 NewHealthCheckFromStructs

func NewHealthCheckFromStructs(t structs.HealthCheck) HealthCheck

func (*HealthCheck) Descriptor

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

func (*HealthCheck) Marshal

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

func (*HealthCheck) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*HealthCheck) MarshalTo

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

func (*HealthCheck) MarshalToSizedBuffer

func (m *HealthCheck) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*HealthCheck) ProtoMessage

func (*HealthCheck) ProtoMessage()

func (*HealthCheck) Reset

func (m *HealthCheck) Reset()

func (*HealthCheck) Size

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

func (*HealthCheck) String

func (m *HealthCheck) String() string

func (*HealthCheck) Unmarshal

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

func (*HealthCheck) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*HealthCheck) XXX_DiscardUnknown

func (m *HealthCheck) XXX_DiscardUnknown()

func (*HealthCheck) XXX_Marshal

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

func (*HealthCheck) XXX_Merge

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

func (*HealthCheck) XXX_Size

func (m *HealthCheck) XXX_Size() int

func (*HealthCheck) XXX_Unmarshal

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

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 `` /* 143-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"`
	TCP      string                 `protobuf:"bytes,5,opt,name=TCP,proto3" json:"TCP,omitempty"`
	Interval time.Duration          `protobuf:"bytes,6,opt,name=Interval,proto3,stdduration" json:"Interval"`
	// mog: func-to=uint func-from=uint32
	OutputMaxSize                  uint32        `protobuf:"varint,9,opt,name=OutputMaxSize,proto3" json:"OutputMaxSize,omitempty"`
	Timeout                        time.Duration `protobuf:"bytes,7,opt,name=Timeout,proto3,stdduration" json:"Timeout"`
	DeregisterCriticalServiceAfter time.Duration `protobuf:"bytes,8,opt,name=DeregisterCriticalServiceAfter,proto3,stdduration" json:"DeregisterCriticalServiceAfter"`
	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"`
	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"`
	TTL                            time.Duration `protobuf:"bytes,17,opt,name=TTL,proto3,stdduration" json:"TTL"`
}

HealthCheckDefinition of a single HealthCheck.

mog annotation:

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

func (*HealthCheckDefinition) Descriptor

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

func (*HealthCheckDefinition) Marshal

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

func (*HealthCheckDefinition) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*HealthCheckDefinition) MarshalTo

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

func (*HealthCheckDefinition) MarshalToSizedBuffer

func (m *HealthCheckDefinition) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*HealthCheckDefinition) ProtoMessage

func (*HealthCheckDefinition) ProtoMessage()

func (*HealthCheckDefinition) Reset

func (m *HealthCheckDefinition) Reset()

func (*HealthCheckDefinition) Size

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

func (*HealthCheckDefinition) String

func (m *HealthCheckDefinition) String() string

func (*HealthCheckDefinition) Unmarshal

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

func (*HealthCheckDefinition) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*HealthCheckDefinition) XXX_DiscardUnknown

func (m *HealthCheckDefinition) XXX_DiscardUnknown()

func (*HealthCheckDefinition) XXX_Marshal

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

func (*HealthCheckDefinition) XXX_Merge

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

func (*HealthCheckDefinition) XXX_Size

func (m *HealthCheckDefinition) XXX_Size() int

func (*HealthCheckDefinition) XXX_Unmarshal

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

type MeshGatewayConfig

type MeshGatewayConfig struct {
	Mode github_com_hashicorp_consul_agent_structs.MeshGatewayMode `` /* 128-byte string literal not displayed */
}

mog annotation:

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

func NewMeshGatewayConfigFromStructs

func NewMeshGatewayConfigFromStructs(t structs.MeshGatewayConfig) MeshGatewayConfig

func (*MeshGatewayConfig) Descriptor

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

func (*MeshGatewayConfig) Marshal

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

func (*MeshGatewayConfig) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*MeshGatewayConfig) MarshalTo

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

func (*MeshGatewayConfig) MarshalToSizedBuffer

func (m *MeshGatewayConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MeshGatewayConfig) ProtoMessage

func (*MeshGatewayConfig) ProtoMessage()

func (*MeshGatewayConfig) Reset

func (m *MeshGatewayConfig) Reset()

func (*MeshGatewayConfig) Size

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

func (*MeshGatewayConfig) String

func (m *MeshGatewayConfig) String() string

func (*MeshGatewayConfig) Unmarshal

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

func (*MeshGatewayConfig) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*MeshGatewayConfig) XXX_DiscardUnknown

func (m *MeshGatewayConfig) XXX_DiscardUnknown()

func (*MeshGatewayConfig) XXX_Marshal

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

func (*MeshGatewayConfig) XXX_Merge

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

func (*MeshGatewayConfig) XXX_Size

func (m *MeshGatewayConfig) XXX_Size() int

func (*MeshGatewayConfig) XXX_Unmarshal

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

type Node

type Node struct {
	ID              github_com_hashicorp_consul_types.NodeID `protobuf:"bytes,1,opt,name=ID,proto3,casttype=github.com/hashicorp/consul/types.NodeID" json:"ID,omitempty"`
	Node            string                                   `protobuf:"bytes,2,opt,name=Node,proto3" json:"Node,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
	pbcommon.RaftIndex `protobuf:"bytes,7,opt,name=RaftIndex,proto3,embedded=RaftIndex" json:"RaftIndex"`
}

Node contains information about a node.

mog annotation:

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

func NewNodeFromStructs

func NewNodeFromStructs(t structs.Node) Node

func (*Node) Descriptor

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

func (*Node) Marshal

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

func (*Node) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*Node) MarshalTo

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

func (*Node) MarshalToSizedBuffer

func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) Reset

func (m *Node) Reset()

func (*Node) Size

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

func (*Node) String

func (m *Node) String() string

func (*Node) Unmarshal

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

func (*Node) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*Node) XXX_DiscardUnknown

func (m *Node) XXX_DiscardUnknown()

func (*Node) XXX_Marshal

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

func (*Node) XXX_Merge

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

func (*Node) XXX_Size

func (m *Node) XXX_Size() int

func (*Node) XXX_Unmarshal

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

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.
	Kind    github_com_hashicorp_consul_agent_structs.ServiceKind `protobuf:"bytes,1,opt,name=Kind,proto3,casttype=github.com/hashicorp/consul/agent/structs.ServiceKind" 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 `` /* 162-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"`
	// 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"`
	// 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"`
	// mog: func-to=RaftIndexToStructs func-from=NewRaftIndexFromStructs
	pbcommon.RaftIndex `protobuf:"bytes,14,opt,name=RaftIndex,proto3,embedded=RaftIndex" json:"RaftIndex"`
}

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 NewNodeServiceFromStructs

func NewNodeServiceFromStructs(t structs.NodeService) NodeService

func (*NodeService) Descriptor

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

func (*NodeService) Marshal

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

func (*NodeService) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*NodeService) MarshalTo

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

func (*NodeService) MarshalToSizedBuffer

func (m *NodeService) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NodeService) ProtoMessage

func (*NodeService) ProtoMessage()

func (*NodeService) Reset

func (m *NodeService) Reset()

func (*NodeService) Size

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

func (*NodeService) String

func (m *NodeService) String() string

func (*NodeService) Unmarshal

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

func (*NodeService) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*NodeService) XXX_DiscardUnknown

func (m *NodeService) XXX_DiscardUnknown()

func (*NodeService) XXX_Marshal

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

func (*NodeService) XXX_Merge

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

func (*NodeService) XXX_Size

func (m *NodeService) XXX_Size() int

func (*NodeService) XXX_Unmarshal

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

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"`
}

Type to hold an address and port of a service

func (*ServiceAddress) Descriptor

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

func (*ServiceAddress) Marshal

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

func (*ServiceAddress) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*ServiceAddress) MarshalTo

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

func (*ServiceAddress) MarshalToSizedBuffer

func (m *ServiceAddress) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ServiceAddress) ProtoMessage

func (*ServiceAddress) ProtoMessage()

func (*ServiceAddress) Reset

func (m *ServiceAddress) Reset()

func (*ServiceAddress) Size

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

func (*ServiceAddress) String

func (m *ServiceAddress) String() string

func (*ServiceAddress) Unmarshal

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

func (*ServiceAddress) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*ServiceAddress) XXX_DiscardUnknown

func (m *ServiceAddress) XXX_DiscardUnknown()

func (*ServiceAddress) XXX_Marshal

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

func (*ServiceAddress) XXX_Merge

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

func (*ServiceAddress) XXX_Size

func (m *ServiceAddress) XXX_Size() int

func (*ServiceAddress) XXX_Unmarshal

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

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"`
}

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 NewServiceConnectFromStructs

func NewServiceConnectFromStructs(t structs.ServiceConnect) ServiceConnect

func NewServiceConnectPtrFromStructs

func NewServiceConnectPtrFromStructs(t *structs.ServiceConnect) *ServiceConnect

TODO: handle this with mog

func (*ServiceConnect) Descriptor

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

func (*ServiceConnect) Marshal

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

func (*ServiceConnect) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*ServiceConnect) MarshalTo

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

func (*ServiceConnect) MarshalToSizedBuffer

func (m *ServiceConnect) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ServiceConnect) ProtoMessage

func (*ServiceConnect) ProtoMessage()

func (*ServiceConnect) Reset

func (m *ServiceConnect) Reset()

func (*ServiceConnect) Size

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

func (*ServiceConnect) String

func (m *ServiceConnect) String() string

func (*ServiceConnect) Unmarshal

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

func (*ServiceConnect) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*ServiceConnect) XXX_DiscardUnknown

func (m *ServiceConnect) XXX_DiscardUnknown()

func (*ServiceConnect) XXX_Marshal

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

func (*ServiceConnect) XXX_Merge

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

func (*ServiceConnect) XXX_Size

func (m *ServiceConnect) XXX_Size() int

func (*ServiceConnect) XXX_Unmarshal

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

type ServiceDefinition

type ServiceDefinition struct {
	Kind    github_com_hashicorp_consul_agent_structs.ServiceKind `protobuf:"bytes,1,opt,name=Kind,proto3,casttype=github.com/hashicorp/consul/agent/structs.ServiceKind" 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 `` /* 162-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"`
	// 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"`
	// mog: func-to=ServiceConnectPtrToStructs func-from=NewServiceConnectPtrFromStructs
	Connect *ServiceConnect `protobuf:"bytes,15,opt,name=Connect,proto3" json:"Connect,omitempty"`
}

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 NewServiceDefinitionFromStructs

func NewServiceDefinitionFromStructs(t structs.ServiceDefinition) ServiceDefinition

func NewServiceDefinitionPtrFromStructs

func NewServiceDefinitionPtrFromStructs(t *structs.ServiceDefinition) *ServiceDefinition

TODO: handle this with mog

func (*ServiceDefinition) Descriptor

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

func (*ServiceDefinition) Marshal

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

func (*ServiceDefinition) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*ServiceDefinition) MarshalTo

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

func (*ServiceDefinition) MarshalToSizedBuffer

func (m *ServiceDefinition) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ServiceDefinition) ProtoMessage

func (*ServiceDefinition) ProtoMessage()

func (*ServiceDefinition) Reset

func (m *ServiceDefinition) Reset()

func (*ServiceDefinition) Size

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

func (*ServiceDefinition) String

func (m *ServiceDefinition) String() string

func (*ServiceDefinition) Unmarshal

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

func (*ServiceDefinition) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*ServiceDefinition) XXX_DiscardUnknown

func (m *ServiceDefinition) XXX_DiscardUnknown()

func (*ServiceDefinition) XXX_Marshal

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

func (*ServiceDefinition) XXX_Merge

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

func (*ServiceDefinition) XXX_Size

func (m *ServiceDefinition) XXX_Size() int

func (*ServiceDefinition) XXX_Unmarshal

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

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"`
}

mog annotation:

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

func NewTransparentProxyConfigFromStructs added in v1.10.0

func NewTransparentProxyConfigFromStructs(t structs.TransparentProxyConfig) TransparentProxyConfig

func (*TransparentProxyConfig) Descriptor added in v1.10.0

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

func (*TransparentProxyConfig) Marshal added in v1.10.0

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

func (*TransparentProxyConfig) MarshalBinary added in v1.10.0

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

MarshalBinary implements encoding.BinaryMarshaler

func (*TransparentProxyConfig) MarshalTo added in v1.10.0

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

func (*TransparentProxyConfig) MarshalToSizedBuffer added in v1.10.0

func (m *TransparentProxyConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TransparentProxyConfig) ProtoMessage added in v1.10.0

func (*TransparentProxyConfig) ProtoMessage()

func (*TransparentProxyConfig) Reset added in v1.10.0

func (m *TransparentProxyConfig) Reset()

func (*TransparentProxyConfig) Size added in v1.10.0

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

func (*TransparentProxyConfig) String added in v1.10.0

func (m *TransparentProxyConfig) String() string

func (*TransparentProxyConfig) Unmarshal added in v1.10.0

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

func (*TransparentProxyConfig) UnmarshalBinary added in v1.10.0

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*TransparentProxyConfig) XXX_DiscardUnknown added in v1.10.0

func (m *TransparentProxyConfig) XXX_DiscardUnknown()

func (*TransparentProxyConfig) XXX_Marshal added in v1.10.0

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

func (*TransparentProxyConfig) XXX_Merge added in v1.10.0

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

func (*TransparentProxyConfig) XXX_Size added in v1.10.0

func (m *TransparentProxyConfig) XXX_Size() int

func (*TransparentProxyConfig) XXX_Unmarshal added in v1.10.0

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

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"`
	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 *types.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"`
	// 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"`
}

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 NewUpstreamFromStructs

func NewUpstreamFromStructs(t structs.Upstream) Upstream

func NewUpstreamsFromStructs

func NewUpstreamsFromStructs(t structs.Upstreams) []Upstream

TODO: handle this with mog

func (*Upstream) Descriptor

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

func (*Upstream) Marshal

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

func (*Upstream) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*Upstream) MarshalTo

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

func (*Upstream) MarshalToSizedBuffer

func (m *Upstream) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Upstream) ProtoMessage

func (*Upstream) ProtoMessage()

func (*Upstream) Reset

func (m *Upstream) Reset()

func (*Upstream) Size

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

func (*Upstream) String

func (m *Upstream) String() string

func (*Upstream) Unmarshal

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

func (*Upstream) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*Upstream) XXX_DiscardUnknown

func (m *Upstream) XXX_DiscardUnknown()

func (*Upstream) XXX_Marshal

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

func (*Upstream) XXX_Merge

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

func (*Upstream) XXX_Size

func (m *Upstream) XXX_Size() int

func (*Upstream) XXX_Unmarshal

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

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"`
}

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

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

func (*Weights) Marshal

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

func (*Weights) MarshalBinary

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

MarshalBinary implements encoding.BinaryMarshaler

func (*Weights) MarshalTo

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

func (*Weights) MarshalToSizedBuffer

func (m *Weights) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Weights) ProtoMessage

func (*Weights) ProtoMessage()

func (*Weights) Reset

func (m *Weights) Reset()

func (*Weights) Size

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

func (*Weights) String

func (m *Weights) String() string

func (*Weights) Unmarshal

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

func (*Weights) UnmarshalBinary

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

UnmarshalBinary implements encoding.BinaryUnmarshaler

func (*Weights) XXX_DiscardUnknown

func (m *Weights) XXX_DiscardUnknown()

func (*Weights) XXX_Marshal

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

func (*Weights) XXX_Merge

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

func (*Weights) XXX_Size

func (m *Weights) XXX_Size() int

func (*Weights) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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