static

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: 16 Imported by: 0

Documentation

Overview

Package static is a generated protocol buffer package.

It is generated from these files:

upstream_spec.proto

It has these top-level messages:

UpstreamSpec
Host

Index

Constants

View Source
const (
	// define Upstream type name
	UpstreamTypeStatic = "static"
)

Variables

This section is empty.

Functions

func EncodeUpstreamSpec

func EncodeUpstreamSpec(spec *UpstreamSpec) v1.UpstreamSpec

Types

type Host

type Host struct {
	// Address (hostname or IP)
	Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	// Port the instance is listening on
	Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
}

Represents a single instance of an upstream

func (*Host) Descriptor

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

func (*Host) Equal

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

func (*Host) GetAddr

func (m *Host) GetAddr() string

func (*Host) GetPort

func (m *Host) GetPort() uint32

func (*Host) ProtoMessage

func (*Host) ProtoMessage()

func (*Host) Reset

func (m *Host) Reset()

func (*Host) String

func (m *Host) String() string

type Plugin

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

func NewPlugin

func NewPlugin() *Plugin

func (*Plugin) HttpFilters

func (p *Plugin) HttpFilters(params *plugins.HttpFilterPluginParams) []plugins.StagedHttpFilter

just use HttpFilters to clear cache

func (*Plugin) Init added in v0.4.2

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

func (*Plugin) ProcessRoute

func (p *Plugin) ProcessRoute(_ *plugins.RoutePluginParams, in *v1.Route, out *envoyroute.Route) error

need to enable automatic host rewrite on routes to SSL upstreams

func (*Plugin) ProcessUpstream

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

type UpstreamSpec

type UpstreamSpec struct {
	// A list of addresses and ports
	// at least one must be specified
	Hosts []*Host `protobuf:"bytes,1,rep,name=hosts" json:"hosts,omitempty"`
	// Enable ipv6 addresses to be used for routing
	EnableIpv6 bool `protobuf:"varint,2,opt,name=enable_ipv6,json=enableIpv6,proto3" json:"enable_ipv6,omitempty"`
	// Attempt to use outbound TLS
	Tls *google_protobuf.BoolValue `protobuf:"bytes,3,opt,name=tls" json:"tls,omitempty"`
}

Configuration for Static Upstreams

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

func (m *UpstreamSpec) GetEnableIpv6() bool

func (*UpstreamSpec) GetHosts

func (m *UpstreamSpec) GetHosts() []*Host

func (*UpstreamSpec) GetTls

func (m *UpstreamSpec) GetTls() *google_protobuf.BoolValue

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