servicemesh

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Envoy = envoy.Envoy
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	systembootstrapper.Interface

	ServiceAnnotations(*latticev1.Service) (map[string]string, error)

	ServiceAddressAnnotations(*latticev1.Address) (map[string]string, error)

	// TransformServicePodTemplateSpec takes in the DeploymentSpec generated for a Service, and applies an service mesh
	// related transforms necessary to a copy of the DeploymentSpec, and returns it.
	TransformServicePodTemplateSpec(*latticev1.Service, *corev1.PodTemplateSpec) (*corev1.PodTemplateSpec, error)

	// ServiceMeshPort returns the port the service mesh is listening on for a given component port.
	ServiceMeshPort(*latticev1.Service, int32) (int32, error)

	// ServiceMeshPorts returns a map whose keys are component ports and values are the port on which the
	// service mesh is listening on for the given key.
	ServiceMeshPorts(*latticev1.Service) (map[int32]int32, error)

	// ServicePort returns the component port for a given port that the service mesh is listening on.
	ServicePort(*latticev1.Service, int32) (int32, error)

	// ServicehPorts returns a map whose keys are service mesh ports and values are the component port for
	// which the service mesh is listening on for the given key.
	ServicePorts(*latticev1.Service) (map[int32]int32, error)

	// ServiceHasIP returns the assigned IP if there is one and the empty string otherwise
	HasServiceIP(*latticev1.Address) (string, error)

	// ServiceIP returns the IP address that should be registered in DNS (assigning one if need be)
	// for the service and annotations that should be applied to the Address.
	ServiceIP(*latticev1.Service, *latticev1.Address) (string, map[string]string, error)

	// ReleaseServiceIP removes a service IP from the pool of currently leased IPs.
	ReleaseServiceIP(*latticev1.Address) (map[string]string, error)

	// IsDeploymentSpecUpdated checks to see if any part of the current DeploymentSpec that the service mesh is responsible
	// for is out of date compared to the desired deployment spec. If the current DeploymentSpec is current, it also returns
	// a copy of the desired DeploymentSpec with the negation of TransformServicePodTemplateSpec applied.
	// That is, if the aspects of the DeploymentSpec that were transformed by TransformServicePodTemplateSpec are all still
	// current, this method should return true, along with a copy of the DeploymentSpec that should be identical to the
	// DeploymentSpec that was passed in to TransformServicePodTemplateSpec.
	IsDeploymentSpecUpdated(
		service *latticev1.Service,
		current, desired, untransformed *appsv1.DeploymentSpec,
	) (bool, string, *appsv1.DeploymentSpec)
}

func NewServiceMesh

func NewServiceMesh(options *Options) (Interface, error)

type Options

type Options struct {
	Envoy *envoy.Options
}

func Flag

func Flag(serviceMesh *string) (cli.Flag, *Options)

func OverlayConfigOptions

func OverlayConfigOptions(staticOptions *Options, dynamicConfig *latticev1.ConfigServiceMesh) (*Options, error)

Jump to

Keyboard shortcuts

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