integrations

package
v0.0.0-...-7f2974b Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ShutdownV1ContextCancelFuncName util.ContextKey = "shutdown.v1.context.cancel"

Variables

This section is empty.

Functions

func GetIntegrationEnablement

func GetIntegrationEnablement(in Integration) (internal, external bool)

func GetIntegrationVisibility

func GetIntegrationVisibility(in Integration) bool

func Register

func Register(cmd *cobra.Command) error

func WithShutdownV1ContextCancelFunc

func WithShutdownV1ContextCancelFunc(ctx context.Context, c context.CancelFunc) context.Context

Types

type Factory

type Factory func() Integration

type FlagEnvHandler

type FlagEnvHandler interface {
	WithPrefix(prefix string) FlagEnvHandler
	WithVisibility(visible bool) FlagEnvHandler

	StringVar(p *string, name string, value string, usage string) error
	String(name string, value string, usage string) error

	StringSliceVar(p *[]string, name string, value []string, usage string) error
	StringSlice(name string, value []string, usage string) error

	BoolVar(p *bool, name string, value bool, usage string) error
	Bool(name string, value bool, usage string) error

	Uint16Var(p *uint16, name string, value uint16, usage string) error
	Uint16(name string, value uint16, usage string) error

	IntVar(p *int, name string, value int, usage string) error
	Int(name string, value int, usage string) error

	DurationVar(p *time.Duration, name string, value time.Duration, usage string) error
	Duration(name string, value time.Duration, usage string) error
}

func NewFlagEnvHandler

func NewFlagEnvHandler(fs *flag.FlagSet) FlagEnvHandler

type Integration

type Integration interface {
	Name() string

	Description() string

	Register(cmd *cobra.Command, fs FlagEnvHandler) error

	Handler(ctx context.Context, cmd *cobra.Command) (svc.Handler, error)
}

type IntegrationEnablement

type IntegrationEnablement interface {
	Integration

	EnabledTypes() (internal, external bool)
}

type IntegrationVisibility

type IntegrationVisibility interface {
	Integration

	Visible() bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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