k8s

package
v0.1.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToConsulCheck

func ConvertToConsulCheck(probe *corev1.Probe, host string) *consul.Check

ConvertToConsulCheck converts Kubernetes probe definition to Consul check definition.

Types

type Client

type Client interface {
	// GetPod returns current pod data.
	GetPod(ctx context.Context, namespace, name string) (*corev1.Pod, error)
	// GetFailureDomainTags returns current failure domain for pod
	GetFailureDomainTags(ctx context.Context, pod *corev1.Pod) ([]string, error)
}

Client is an interface for client to Kubernetes API.

type ServiceProvider

type ServiceProvider struct {
	Client Client
}

ServiceProvider is responsible for providing services that should be registered in Consul discovery service.

func (*ServiceProvider) Get

Get returns slice of services that are configured to be registered in Consul discovery service.

Jump to

Keyboard shortcuts

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