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 { AppName string ServiceRole string ServiceConfig types.ServiceConfig ContainerPort string HostPort string BuildMode types.BuildMode RemoteEnvironmentID string }
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, remoteEnvironmentID string) 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