gateway

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: Apache-2.0, Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	StatusRefreshPeriod  time.Duration `envconfig:"default=15s"`
	StatusCallTimeout    time.Duration `envconfig:"default=500ms"`
	IntegrationNamespace string
}

type Service

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

Service gives a functionality to provide gateway status. It hides implementation details and exports necessary methods.

func New

func New(restConfig *rest.Config, reCfg Config, informerResyncPeriod time.Duration) (*Service, error)

func (*Service) GetStatus

func (svc *Service) GetStatus(reName string) Status

func (*Service) Start

func (svc *Service) Start(stopCh <-chan struct{})

type ServiceData

type ServiceData struct {
	// Host is a host, which is used to do HTTP call for status check, for example ec-default.production.svc.cluster.local:8080
	Host string

	// RemoteEnvironmentName is the name of Remote Environment, taken from the remoteEnvironment label value
	RemoteEnvironmentName string
}

type Status

type Status string
const (
	StatusNotServing    Status = "NotServing"
	StatusServing       Status = "Serving"
	StatusNotConfigured Status = "GatewayNotConfigured"
)

Directories

Path Synopsis
Code generated by mockery v1.0.0
Code generated by mockery v1.0.0

Jump to

Keyboard shortcuts

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