caasrbacmapper

package
v0.0.0-...-6dcaeb9 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Manifold

func Manifold(config ManifoldConfig) dependency.Manifold

Types

type DefaultMapper

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

DefaultMapper is a default implementation of the MapperWorker interface. It's responsible for watching ServiceAccounts on a given model and

func NewMapper

func NewMapper(logger Logger, informer core.ServiceAccountInformer) (*DefaultMapper, error)

NewMapper constructs a new DefaultMapper for the supplied logger and ServiceAccountInformer

func (*DefaultMapper) AppNameForServiceAccount

func (d *DefaultMapper) AppNameForServiceAccount(id types.UID) (string, error)

AppNameForServiceAccount implements Mapper interface

func (*DefaultMapper) Kill

func (d *DefaultMapper) Kill()

Kill implements Kill() from the Worker interface

func (*DefaultMapper) Wait

func (d *DefaultMapper) Wait() error

Wait implements Wait() from the Worker interface

type K8sBroker

type K8sBroker interface {
	SharedInformerFactory() informers.SharedInformerFactory
}

type Logger

type Logger interface {
	Errorf(string, ...interface{})
}

type ManifoldConfig

type ManifoldConfig struct {
	BrokerName string
	Logger     Logger
}

func (ManifoldConfig) Start

func (c ManifoldConfig) Start(context dependency.Context) (worker.Worker, error)

func (ManifoldConfig) Validate

func (c ManifoldConfig) Validate() error

type Mapper

type Mapper interface {
	// AppNameForServiceAccount fetches the juju application name associated
	// with a given kubernetes service account UID. If no result is found
	// errors.NotFound is returned. All other errors should be considered
	// internal to the interface operation.
	AppNameForServiceAccount(types.UID) (string, error)
}

Mapper describes an interface for mapping k8s service account UID's to juju application names.

type MapperWorker

type MapperWorker interface {
	Mapper
	worker.Worker
}

MapperWorker is a Mapper that also implements the worker interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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