gateway

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2017 License: Apache-2.0, Apache-2.0 Imports: 19 Imported by: 1

Documentation

Overview

Copyright 2016 Planet Labs

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const HostnameAliasKey = "hostname-aliases"

Variables

View Source
var DefaultConfig = Config{
	HTTPListenPort:  7331,
	FarvaHealthPort: 7333,
	FifoPath:        "/nginx.fifo",
}
View Source
var DefaultKubernetesReverseProxyConfigGetterConfig = kubernetesReverseProxyConfigGetterConfig{
	AnnotationPrefix: "klondike.gateway",
}
View Source
var (
	DefaultNGINXConfig = NGINXConfig{
		ClusterZone: "example.com",
		ConfigFile:  "/etc/nginx/nginx.conf",
		PIDFile:     "/var/run/nginx.pid",
		HealthPort:  7332,
		AccessLog:   "/dev/stdout",
		ErrorLog:    "/dev/stderr",
		MaxBodySize: "10m",
	}
)

Functions

func CanonicalHostname

func CanonicalHostname(name, namespace, clusterZone string) string

func DefaultHTTPReverseProxyServers

func DefaultHTTPReverseProxyServers(cfg *Config) []httpReverseProxyServer

func DefaultReverseProxyConfig

func DefaultReverseProxyConfig(cfg *Config) *reverseProxyConfig

Types

type Config

type Config struct {
	RefreshInterval  time.Duration
	KubeconfigFile   string
	ClusterZone      string
	NGINXDryRun      bool
	NGINXHealthPort  int
	NGINXMaxBodySize string
	HTTPListenPort   int
	FarvaHealthPort  int
	AnnotationPrefix string
	FifoPath         string
}

type Gateway

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

func New

func New(cfg Config) (*Gateway, error)

func (*Gateway) Run

func (gw *Gateway) Run() error

type NGINXConfig

type NGINXConfig struct {
	ClusterZone string
	ConfigFile  string
	PIDFile     string
	HealthPort  int
	ListenPort  int
	ErrorLog    string
	AccessLog   string
	MaxBodySize string
}

type NGINXManager

type NGINXManager interface {
	Status() (string, error)
	SetConfig(*reverseProxyConfig) error
	Start() error
}

type ReverseProxyConfigGetter

type ReverseProxyConfigGetter interface {
	ReverseProxyConfig() (*reverseProxyConfig, error)
}

Jump to

Keyboard shortcuts

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