services

package
v4.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateServiceInput

type CreateServiceInput struct {
	// Name represents the name of the service.
	Name string

	// Type is the type of the service that's being created.
	// Kubernetes: ClusterIP or LoadBalancer.
	Type string

	// Namespace is the namespace where the service will live in.
	Namespace string

	// ServiceLabels are the unique set of key-value pairs that will define this service.
	ServiceLabels map[string]string

	// TargetLabels are the unique set of key-value pairs that the service will be pointed to.
	TargetLabels map[string]string

	// Ports describes the name and the port number that are going to be exposed by the created service.
	Ports map[string]int32
}

CreateServiceInput is used as an input of Services.Create method. It has all the information needed to create a new service.

type Services

type Services interface {
	Create(ctx context.Context, input CreateServiceInput) (resource.Resource, error)
	Get(ctx context.Context, name string, namespace string) (resource.Resource, error)
	List(ctx context.Context, namespace string, selector resource.Selector) ([]resource.Resource, error)
	Remove(ctx context.Context, resource resource.Resource) error
}

Services groups a set of methods for managing services like Load Balancers. services are usually used to abstract a group of pods behind a single endpoint.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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