Documentation ¶
Overview ¶
Package services encapsulates all the functionality around Epinio services
Index ¶
- func UpdateService(ctx context.Context, cluster *kubernetes.Cluster, service *Service, ...) error
- type Service
- func (s *Service) Delete(ctx context.Context) error
- func (s *Service) Details(ctx context.Context) (map[string]string, error)
- func (s *Service) GetBinding(ctx context.Context, appName string, _ string) (*corev1.Secret, error)
- func (s *Service) Name() string
- func (s *Service) Namespace() string
- func (s *Service) User() string
- type ServiceList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UpdateService ¶ added in v0.3.0
func UpdateService(ctx context.Context, cluster *kubernetes.Cluster, service *Service, changes models.ServiceUpdateRequest) error
UpdateService modifies an existing service as per the instructions and writes the result back to the resource.
Types ¶
type Service ¶ added in v0.1.2
type Service struct { SecretName string NamespaceName string Service string Username string // contains filtered or unexported fields }
Service contains the information needed for Epinio to address a specific service.
func CreateService ¶ added in v0.1.2
func CreateService(ctx context.Context, cluster *kubernetes.Cluster, name, namespace, username string, data map[string]string) (*Service, error)
CreateService creates a new service instance from namespace, name, and a map of parameters.
func Lookup ¶
func Lookup(ctx context.Context, kubeClient *kubernetes.Cluster, namespace, service string) (*Service, error)
Lookup locates a Service by namespace and name. It finds the Service instance by looking for the relevant Secret.
func (*Service) Delete ¶ added in v0.1.2
Delete destroys the service instance, i.e. its underlying secret holding the instance's parameters
func (*Service) Details ¶ added in v0.1.2
Details returns the service instance's configuration. I.e. the parameter data.
func (*Service) GetBinding ¶ added in v0.1.2
GetBinding returns the secret representing the instance's binding to the application. This is actually the instance's secret itself, independent of the application.
type ServiceList ¶ added in v0.1.2
type ServiceList []*Service
func List ¶
func List(ctx context.Context, cluster *kubernetes.Cluster, namespace string) (ServiceList, error)
List returns a ServiceList of all available Services in the specified namespace. If no namespace is specified (empty string) then services across all namespaces are returned.