consul

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2018 License: Apache-2.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateFetcher

type CertificateFetcher interface {
	Certs() <-chan types.CertificateAndKey
	RootCerts() <-chan types.Certificates
}

func NewCertificateFetcher

func NewCertificateFetcher(ctx context.Context, configWriter ConfigWriter, cfg ConsulConnectConfig) (CertificateFetcher, error)

func NewCertificateFetcherFromInterface

func NewCertificateFetcherFromInterface(ctx context.Context, configWriter ConfigWriter, cfg ConsulConnectConfig, client ConnectClient) (CertificateFetcher, error)

type ConfigWriter

type ConfigWriter interface {
	Write(cfg *api.ConnectProxyConfig) error
}

type ConnectClient

type ConnectClient interface {
	ConnectCARoots(q *api.QueryOptions) (*api.CARootList, *api.QueryMeta, error)
	ConnectCALeaf(svcname string, q *api.QueryOptions) (*api.LeafCert, *api.QueryMeta, error)
	ConnectProxyConfig(proxyid string, q *api.QueryOptions) (*api.ConnectProxyConfig, *api.QueryMeta, error)
}

type ConsulConnectConfig

type ConsulConnectConfig interface {
	ProxyId() string
	Token() string
}

func NewConsulConnectConfigFromEnv

func NewConsulConnectConfigFromEnv() (ConsulConnectConfig, error)

type ProxyConfig

type ProxyConfig struct {
	BindAddress         string     `json:"bind_address" mapstructure:"bind_address"`
	BindPort            uint       `json:"bind_port" mapstructure:"bind_port"`
	LocalServiceAddress string     `json:"local_service_address" mapstructure:"local_service_address"`
	Upstreams           []Upstream `json:"upstreams" mapstructure:"upstreams"`
}

func GetProxyConfig

func GetProxyConfig(pcfg *api.ConnectProxyConfig) (*ProxyConfig, error)

type Upstream

type Upstream struct {
	DestinationName string `json:"destination_name" mapstructure:"destination_name"`
	DestinationType string `json:"destination_type" mapstructure:"destination_type"`
	LocalBindPort   uint32 `json:"local_bind_port" mapstructure:"local_bind_port"`
}

Jump to

Keyboard shortcuts

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