config

package
v1.5.3-rc1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 31 Imported by: 0

Documentation

Overview

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

View Source
const (
	AccessLogFormatJson string = "json"
	AccessLogFormatText string = "text"
)
View Source
const (
	RouteName = "local_route"
)

Variables

This section is empty.

Functions

func ConfigSource added in v1.2.0

func ConfigSource(cluster string) *envoy_core_v3.ConfigSource

ConfigSource returns a *envoy_core_v3.ConfigSource for cluster.

func IsRouterFilter added in v1.2.0

func IsRouterFilter(filter *hcm.HttpFilter) bool

func NewListenerBuilder

func NewListenerBuilder() *listenerBuilder

Types

type AccessLogBuilder

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

func NewJSONAccessLog

func NewJSONAccessLog(template map[string]string) (*AccessLogBuilder, error)

func NewTextAccessLog

func NewTextAccessLog(template string) (*AccessLogBuilder, error)

func (*AccessLogBuilder) GetAccessLog

func (a *AccessLogBuilder) GetAccessLog() *accesslog.AccessLog

func (*AccessLogBuilder) ValidateAll added in v1.1.5

func (a *AccessLogBuilder) ValidateAll() error

type Certificate

type Certificate struct {
	Cert string
	Key  string
}

type EnvoyConfiguration

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

func New

func New() *EnvoyConfiguration

func (*EnvoyConfiguration) AddCluster

func (e *EnvoyConfiguration) AddCluster(clusterName, upstreamServiceHost string, upstreamServicePort uint32)

AddCluster creates Envoy cluster which is the representation of backend service For the simplicity right now we don't support endpoints assignments separately, i.e. one cluster - one endpoint, not multiple load balanced Cluster with the same name will be overwritten

func (*EnvoyConfiguration) AddClusterWithTLS added in v1.2.0

func (e *EnvoyConfiguration) AddClusterWithTLS(clusterName, upstreamServiceHost string, upstreamServicePort uint32) error

AddClusterWithTLS - AddCluster with SNI or rather `AutoSni` enabled`. Example SNI : "kubeshop-kusk-gateway-oauth2.eu.auth0.com" -> "eu.auth0.com"

func (*EnvoyConfiguration) AddListener

func (e *EnvoyConfiguration) AddListener(l *listener.Listener)

func (*EnvoyConfiguration) AddRouteToVHost

func (e *EnvoyConfiguration) AddRouteToVHost(vhost string, rt *route.Route) error

AddRouteToVHost appends new route with proxying to the upstream to the list of routes by path and method

func (*EnvoyConfiguration) AddVirtualHost

func (e *EnvoyConfiguration) AddVirtualHost(vh *types.VirtualHost)

func (*EnvoyConfiguration) ClusterExist

func (e *EnvoyConfiguration) ClusterExist(name string) bool

func (*EnvoyConfiguration) GenerateSnapshot

func (e *EnvoyConfiguration) GenerateSnapshot() (*cache.Snapshot, error)

func (*EnvoyConfiguration) GetVirtualHost

func (e *EnvoyConfiguration) GetVirtualHost(name string) *types.VirtualHost

func (*EnvoyConfiguration) GetVirtualHosts

func (e *EnvoyConfiguration) GetVirtualHosts() map[string]*types.VirtualHost

type HCMBuilder added in v1.1.0

type HCMBuilder struct {
	HTTPConnectionManager *hcm.HttpConnectionManager
}

func NewHCMBuilder

func NewHCMBuilder() (*HCMBuilder, error)

func (*HCMBuilder) AddAccessLog added in v1.1.0

func (h *HCMBuilder) AddAccessLog(al *accesslog.AccessLog) *HCMBuilder

func (*HCMBuilder) AddFilter added in v1.2.0

func (h *HCMBuilder) AddFilter(newFilter *hcm.HttpFilter) error

AddFilter appends f to the list of filters for this HTTPConnectionManager. f may be nil, in which case it is ignored and an error will be returned. Note that Router filters (filters with TypeUrl `type.googleapis.com/envoy.extensions.filters.http.router.v3.Router`) are specially treated. There may only be one of these filters, and it must be the last. AddFilter will ensure that the router filter, if present, is last, and will panic if a second Router is added when one is already present.

func (*HCMBuilder) GetHTTPConnectionManager added in v1.1.0

func (h *HCMBuilder) GetHTTPConnectionManager() *hcm.HttpConnectionManager

func (*HCMBuilder) ValidateAll added in v1.1.5

func (h *HCMBuilder) ValidateAll() error

type TLS

type TLS struct {
	CipherSuites              []string
	TlsMinimumProtocolVersion string
	TlsMaximumProtocolVersion string
	Certificates              []Certificate
}

Jump to

Keyboard shortcuts

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