gateway

package
v0.0.0-...-affaa53 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: 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(k8sCli kubernetes.Interface, reCfg Config, informerResyncPeriod time.Duration) (*Service, error)

func (*Service) GetStatus

func (svc *Service) GetStatus(appName 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

	// ApplicationName is the name of Application, taken from the `applicationLabelName` label value
	ApplicationName 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