models

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Domain       string
	AppName      string
	AppNamespace string
	ClusterName  string
	Ports        []int
	IsSocket     bool
	SocketPorts  []int
}

AppConfig encapsulates the configuration for all routes to a single back end.

func BuildAppConfig

func BuildAppConfig(
	service *v1.Service,
	kubeDomainSuffix string,
) *AppConfig

BuildAppConfig builds AppConfig from service

type FileSystem

type FileSystem interface {
	MkdirAll(path string, perm os.FileMode) error
	Create(name string) (afero.File, error)
	RemoveAll(path string) error
}

FileSystem interface

type MockFS

type MockFS struct {
	AppFS afero.Fs
	// contains filtered or unexported fields
}

MockFS implements FileSystem interface

func NewMockFS

func NewMockFS(err error) *MockFS

NewMockFS constructs a new mock

func (*MockFS) Create

func (m *MockFS) Create(name string) (afero.File, error)

Create creates a mock file

func (*MockFS) MkdirAll

func (m *MockFS) MkdirAll(path string, perm os.FileMode) error

MkdirAll creates a mock directory

func (*MockFS) RemoveAll added in v0.1.5

func (m *MockFS) RemoveAll(path string) error

RemoveAll removes a file

type RealFS

type RealFS struct{}

RealFS implements FileSystem interface

func NewRealFS

func NewRealFS() *RealFS

NewRealFS constructs a new mock

func (*RealFS) Create

func (m *RealFS) Create(name string) (afero.File, error)

Create creates a mock file

func (*RealFS) MkdirAll

func (m *RealFS) MkdirAll(path string, perm os.FileMode) error

MkdirAll creates a mock directory

func (*RealFS) RemoveAll added in v0.1.5

func (m *RealFS) RemoveAll(path string) error

RemoveAll removes a file

type RouterConfig

type RouterConfig struct {
	WorkerProcesses           string `key:"workerProcesses" constraint:"^(auto|[1-9]\\d*)$"`
	MaxWorkerConnections      string `key:"maxWorkerConnections" constraint:"^[1-9]\\d*$"`
	ServerNamesHashMaxSize    string `key:"serverNamesHashMaxSize" constraint:"^[1-9]\\d*$"`
	ServerNamesHashBucketSize string `key:"serverNamesHashBucketSize" constraint:"^[1-9]\\d*$"`
	AppConfigs                []*AppConfig
	ControllerDomain          string
	LoggerDomain              string
}

RouterConfig is the primary type used to encapsulate all router configuration.

func NewRouterConfig

func NewRouterConfig(kubeDomainSuffix string) *RouterConfig

NewRouterConfig builds new router config with default values If this error occurs "could not build the server_names_hash", either increase ServerNamesHashMaxSize to a number close to the number of servers (users * services he/she uses), or increase ServerNamesHashBucketSize (in this case, the server_name is becoming too long)

Jump to

Keyboard shortcuts

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