Documentation ¶
Index ¶
- func NewServiceAccounts() model.ServiceAccounts
- type Config
- type Controller
- type CopilotClient
- type CopilotConfig
- type ServiceDiscovery
- func (sd *ServiceDiscovery) GetProxyServiceInstances(proxy model.Proxy) ([]*model.ServiceInstance, error)
- func (sd *ServiceDiscovery) GetService(hostname string) (*model.Service, error)
- func (sd *ServiceDiscovery) Instances(hostname string, ports []string, tagsList 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 CopilotClient ¶
type CopilotClient interface { copilotapi.IstioCopilotClient }
CopilotClient defines a local interface for interacting with Cloud Foundry Copilot
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 ¶
func (sd *ServiceDiscovery) GetService(hostname string) (*model.Service, error)
GetService implements a service catalog operation
func (*ServiceDiscovery) Instances ¶
func (sd *ServiceDiscovery) Instances(hostname string, ports []string, tagsList model.LabelsCollection) ([]*model.ServiceInstance, error)
Instances implements a service catalog operation
func (*ServiceDiscovery) ManagementPorts ¶
func (sd *ServiceDiscovery) ManagementPorts(addr string) model.PortList
ManagementPorts is not currently implemented for Cloud Foundry