Documentation
¶
Index ¶
- func NewServiceAccounts() model.ServiceAccounts
- type Config
- type Controller
- type CopilotConfig
- type ServiceDiscovery
- func (sd *ServiceDiscovery) GetProxyServiceInstances(proxy *model.Proxy) ([]*model.ServiceInstance, error)
- func (sd *ServiceDiscovery) GetService(hostname model.Hostname) (*model.Service, error)
- func (sd *ServiceDiscovery) Instances(hostname model.Hostname, _ []string, _ model.LabelsCollection) ([]*model.ServiceInstance, error)
- func (sd *ServiceDiscovery) InstancesByPort(hostname model.Hostname, _ int, labels model.LabelsCollection) ([]*model.ServiceInstance, error)
- func (sd *ServiceDiscovery) ManagementPorts(addr string) model.PortList
- func (sd *ServiceDiscovery) Services() ([]*model.Service, error)
- type Ticker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServiceAccounts ¶
func NewServiceAccounts() model.ServiceAccounts
NewServiceAccounts instantiates the Cloud Foundry service account interface
Types ¶
type Config ¶
type Config struct {
Copilot CopilotConfig `yaml:"copilot"`
// Cloud Foundry currently only supports applications exposing a single HTTP or TCP port
// It is typically set to 8080.
ServicePort int `yaml:"service_port" validate:"nonzero"`
}
Config for the Cloud Foundry platform adapter
func LoadConfig ¶
LoadConfig reads configuration data from a YAML file
func (*Config) ClientTLSConfig ¶
ClientTLSConfig returns a tls.Config needed to instantiate a copilot.IstioClient
type Controller ¶
type Controller struct {
Client copilotapi.IstioCopilotClient
Ticker Ticker
// contains filtered or unexported fields
}
Controller communicates with Cloud Foundry and monitors for changes
func (*Controller) AppendInstanceHandler ¶
func (c *Controller) AppendInstanceHandler(f func(*model.ServiceInstance, model.Event)) error
AppendInstanceHandler implements a service catalog operation
func (*Controller) AppendServiceHandler ¶
AppendServiceHandler implements a service catalog operation
func (*Controller) Run ¶
func (c *Controller) Run(stop <-chan struct{})
Run will loop, calling handlers in response to changes, until a signal is received
type CopilotConfig ¶
type CopilotConfig struct {
ServerCACertPath string `yaml:"server_ca_cert_path" validate:"nonzero"`
ClientCertPath string `yaml:"client_cert_path" validate:"nonzero"`
ClientKeyPath string `yaml:"client_key_path" validate:"nonzero"`
Address string `yaml:"address" validate:"nonzero"`
PollInterval time.Duration `yaml:"poll_interval" validate:"nonzero"`
}
CopilotConfig describes how the Cloud Foundry platform adapter can connect to the Cloud Foundry Copilot
type ServiceDiscovery ¶
type ServiceDiscovery struct {
Client copilotClient
// Cloud Foundry currently only supports applications exposing a single HTTP or TCP port
// It is typically 8080
ServicePort int
}
ServiceDiscovery implements the model.ServiceDiscovery interface for Cloud Foundry
func (*ServiceDiscovery) GetProxyServiceInstances ¶
func (sd *ServiceDiscovery) GetProxyServiceInstances(proxy *model.Proxy) ([]*model.ServiceInstance, error)
GetProxyServiceInstances returns all service instances running on a particular proxy Cloud Foundry integration is currently ingress-only -- there is no sidecar support yet. So this function always returns an empty slice.
func (*ServiceDiscovery) GetService ¶
GetService implements a service catalog operation
func (*ServiceDiscovery) Instances ¶
func (sd *ServiceDiscovery) Instances(hostname model.Hostname, _ []string, _ model.LabelsCollection) ([]*model.ServiceInstance, error)
Instances implements a service catalog operation
func (*ServiceDiscovery) InstancesByPort ¶
func (sd *ServiceDiscovery) InstancesByPort(hostname model.Hostname, _ int, labels model.LabelsCollection) ([]*model.ServiceInstance, error)
InstancesByPort implements a service catalog operation
func (*ServiceDiscovery) ManagementPorts ¶
func (sd *ServiceDiscovery) ManagementPorts(addr string) model.PortList
ManagementPorts is not currently implemented for Cloud Foundry