commands

package
v0.0.0-...-cabf8b7 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandHandler

type CommandHandler interface {
	HandleCommand(c messenger.Command) (string, error)
}

func Accept

func Accept() CommandHandler

func Augment

func Augment(ctx context.Context, metadataCollector metadatax.Collector, logger logr.Logger) CommandHandler

func CSRSign

func CSRSign(certSigner X509CertificateRequestSigner, defaultCertTTL time.Duration) (CommandHandler, error)

func Connect

func Connect() CommandHandler

func Log

func Log(eventBus *eventbus.EventBus, logger logr.Logger) CommandHandler

type CommandHandlerFunc

type CommandHandlerFunc func(messenger.Command) (string, error)

func (CommandHandlerFunc) HandleCommand

func (f CommandHandlerFunc) HandleCommand(c messenger.Command) (string, error)

type Commander

type Commander interface {
	Run(ctx context.Context) error
	AddHandler(commandName string, handler CommandHandler)
}

func NewHandler

func NewHandler(eventBus *eventbus.EventBus, logger logr.Logger) (Commander, error)

type X509CertificateRequestSigner

type X509CertificateRequestSigner interface {
	SignCertificateRequest(req *x509.CertificateRequest, ttl time.Duration) (*tls.X509Certificate, []*tls.X509Certificate, error)
	GetTrustAnchor() *tls.X509Certificate
}

Jump to

Keyboard shortcuts

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