endpoints

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PortReservation

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

PortReservation reserves a free port for services

func NewPortReservation

func NewPortReservation() *PortReservation

NewPortReservation instantiates a port reservation struct

func (*PortReservation) GetAvailablePort

func (p *PortReservation) GetAvailablePort() string

GetAvailablePort returns an available port as a string

type ServiceEndpoint

type ServiceEndpoint struct {
	ServiceRole   string
	ServiceConfig types.ServiceConfig
	ContainerPort string
	HostPort      string
	BuildMode     types.BuildMode
}

ServiceEndpoint holds the information to build an endpoint at which a service can be reached

func (*ServiceEndpoint) GetEndpointMappings

func (s *ServiceEndpoint) GetEndpointMappings() map[string]string

GetEndpointMappings returns a map from env var name to env var value of a service endpoint

func (*ServiceEndpoint) GetPortMappings

func (s *ServiceEndpoint) GetPortMappings() []string

GetPortMappings returns a list of port mappings from a service's container ports to host ports

type ServiceEndpoints

type ServiceEndpoints map[string]*ServiceEndpoint

ServiceEndpoints holds the information to build an endpoint at which a service can be reached

func NewServiceEndpoints

func NewServiceEndpoints(appContext *context.AppContext, buildMode types.BuildMode) ServiceEndpoints

NewServiceEndpoints returns the constructed service endpoint objects for all services in an application

func (ServiceEndpoints) GetServiceEndpointEnvVars

func (s ServiceEndpoints) GetServiceEndpointEnvVars(serviceRole string) map[string]string

GetServiceEndpointEnvVars creates all the endpoint env vars for a service

func (ServiceEndpoints) GetServicePortMappings

func (s ServiceEndpoints) GetServicePortMappings(serviceRole string) []string

GetServicePortMappings gets the port mapping for a particular service

Jump to

Keyboard shortcuts

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