consul

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2018 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package consul is a generated protocol buffer package.

It is generated from these files:

spec.proto

It has these top-level messages:

UpstreamSpec
Connect

Index

Constants

View Source
const (
	LeafCertificateSecret = "certificates"
)
View Source
const (
	// define Upstream type name
	UpstreamTypeConsul = "consul"
)

Variables

This section is empty.

Functions

func EncodeUpstreamSpec

func EncodeUpstreamSpec(spec UpstreamSpec) *types.Struct

func NewEndpointController

func NewEndpointController(cfg *api.Config) (*endpointController, error)

func UpstreamNameForConnectService

func UpstreamNameForConnectService(serviceName string) string

TODO(ilackarms + yuval-k): assess where this function should ive

Types

type Connect

type Connect struct {
	// A reference to a Gloo secret containing the client TLS parameters for connecting to this service
	TlsSecretRef string `protobuf:"bytes,1,opt,name=tls_secret_ref,json=tlsSecretRef,proto3" json:"tls_secret_ref,omitempty"`
}

Connect contains the information necessary to connect to proxies that are running as sidecars for Consul Connect (in-mesh) services

func (*Connect) Descriptor

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

func (*Connect) Equal

func (this *Connect) Equal(that interface{}) bool

func (*Connect) GetTlsSecretRef

func (m *Connect) GetTlsSecretRef() string

func (*Connect) ProtoMessage

func (*Connect) ProtoMessage()

func (*Connect) Reset

func (m *Connect) Reset()

func (*Connect) String

func (m *Connect) String() string

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

func (*Plugin) GetDependencies

func (p *Plugin) GetDependencies(cfg *v1.Config) *plugins.Dependencies

func (*Plugin) Init added in v0.4.2

func (p *Plugin) Init(options bootstrap.Options) error

func (*Plugin) ProcessUpstream

func (p *Plugin) ProcessUpstream(params *plugins.UpstreamPluginParams, in *v1.Upstream, out *envoyapi.Cluster) error

func (*Plugin) SetupEndpointDiscovery

func (p *Plugin) SetupEndpointDiscovery() (endpointdiscovery.Interface, error)

type UpstreamSpec

type UpstreamSpec struct {
	// The name of the Service as it is registered in Consul
	ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
	// The list of service tags Gloo should search for on a service instance before deciding whether or not to
	// include the instance as part of this upstream
	ServiceTags []string `protobuf:"bytes,2,rep,name=service_tags,json=serviceTags" json:"service_tags,omitempty"`
	// Connect specifies configuration for consul services that are "Connect-enabled". See
	// for more information about Consul Connect
	Connect *Connect `protobuf:"bytes,3,opt,name=connect" json:"connect,omitempty"`
}

Upstream Spec for Consul Upstreams Consul Upstreams represent a set of one or more instances of a Service that has been registered with Consul Consul Upstreams map to multiple service instances by the name and tags found on each instance Consul Upstreams are typically generated automatically by Gloo from the Consul Service Catalog

func DecodeUpstreamSpec

func DecodeUpstreamSpec(generic v1.UpstreamSpec) (*UpstreamSpec, error)

func (*UpstreamSpec) Descriptor

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

func (*UpstreamSpec) Equal

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

func (*UpstreamSpec) GetConnect

func (m *UpstreamSpec) GetConnect() *Connect

func (*UpstreamSpec) GetServiceName

func (m *UpstreamSpec) GetServiceName() string

func (*UpstreamSpec) GetServiceTags

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

func (*UpstreamSpec) ProtoMessage

func (*UpstreamSpec) ProtoMessage()

func (*UpstreamSpec) Reset

func (m *UpstreamSpec) Reset()

func (*UpstreamSpec) String

func (m *UpstreamSpec) String() string

Jump to

Keyboard shortcuts

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