services

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package services encapsulates all the functionality around Epinio services

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReplaceService added in v0.3.2

func ReplaceService(ctx context.Context, cluster *kubernetes.Cluster, service *Service, data map[string]string) (bool, error)

ReplaceService replaces an existing service

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

func (s *Service) Delete(ctx context.Context) error

Delete destroys the service instance, i.e. its underlying secret holding the instance's parameters

func (*Service) Details added in v0.1.2

func (s *Service) Details(ctx context.Context) (map[string]string, error)

Details returns the service instance's configuration. I.e. the parameter data.

func (*Service) GetBinding added in v0.1.2

func (s *Service) GetBinding(ctx context.Context, appName string, _ string) (*corev1.Secret, error)

GetBinding returns the secret representing the instance's binding to the application. This is actually the instance's secret itself, independent of the application.

func (*Service) Name added in v0.1.2

func (s *Service) Name() string

Name returns the service instance's name

func (*Service) Namespace added in v0.2.1

func (s *Service) Namespace() string

Namespace returns the service instance's namespace

func (*Service) User added in v0.1.2

func (s *Service) User() string

User returns the service's username

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.

Jump to

Keyboard shortcuts

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