podidentity

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package podidentity is a generated GoMock package.

Index

Constants

View Source
const (
	// AnnotationKeyPodIdentity is the annotation key used for pod identity.
	AnnotationKeyPodIdentity = "operator.m3db.io/pod-identity"
)

Variables

This section is empty.

Functions

func IdentityJSON

func IdentityJSON(id *myspec.PodIdentity) (string, error)

IdentityJSON returns a pod's identity in JSON form as a string.

Types

type MockProvider

type MockProvider struct {
	// contains filtered or unexported fields
}

MockProvider is a mock of Provider interface.

func NewMockProvider

func NewMockProvider(ctrl *gomock.Controller) *MockProvider

NewMockProvider creates a new mock instance.

func (*MockProvider) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockProvider) Identity

func (m *MockProvider) Identity(pod *v1.Pod, cluster *v1alpha1.M3DBCluster) (*v1alpha1.PodIdentity, error)

Identity mocks base method.

type MockProviderMockRecorder

type MockProviderMockRecorder struct {
	// contains filtered or unexported fields
}

MockProviderMockRecorder is the mock recorder for MockProvider.

func (*MockProviderMockRecorder) Identity

func (mr *MockProviderMockRecorder) Identity(pod, cluster interface{}) *gomock.Call

Identity indicates an expected call of Identity.

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option configures a pod identity provider.

func WithLogger

func WithLogger(l *zap.Logger) Option

WithLogger configures the provider's logger.

func WithNodeLister

func WithNodeLister(n corelisters.NodeLister) Option

WithNodeLister configures the node lister.

type Provider

type Provider interface {
	Identity(pod *corev1.Pod, cluster *myspec.M3DBCluster) (*myspec.PodIdentity, error)
}

Provider creates a pod's cluster identity given required info.

func NewProvider

func NewProvider(opts ...Option) (Provider, error)

NewProvider returns a new provider.

Jump to

Keyboard shortcuts

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