services

package
v0.28.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admission added in v0.28.2

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

Admission admits storage's Create and Update writes. Its Admitter is set after storage starts, since it depends on storage, and until then every write is made.

func (*Admission) Admit added in v0.28.2

func (a *Admission) Admit(ctx context.Context, obj kclient.Object, write func() error) error

func (*Admission) Set added in v0.28.2

func (a *Admission) Set(admitter Admitter)

type Admitter added in v0.28.2

type Admitter interface {
	// Admit runs write, storage's write of obj, if obj may be written.
	Admit(ctx context.Context, obj kclient.Object, write func() error) error
}

Admitter decides whether storage makes a write.

type Config

type Config struct {
	StorageListenPort int    `usage:"Port to storage backend will listen on (default: random port)"`
	StorageToken      string `usage:"Token for storage access, will be generated if not passed"`
	DSN               string `` /* 135-byte string literal not displayed */
}

type Services

type Services struct {
	DB        *db.Factory
	Authn     *authn.Authenticator
	Authz     authorizer.Authorizer
	Admission *Admission
}

func New

func New(config Config) (_ *Services, err error)

Jump to

Keyboard shortcuts

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