opts

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientSetOption

type ClientSetOption func(*ClientSetOptions)

func WithLogger

func WithLogger(lg *slog.Logger) ClientSetOption

func WithStorageTimeout

func WithStorageTimeout(timeout time.Duration) ClientSetOption

type ClientSetOptions

type ClientSetOptions struct {
	Logger     *slog.Logger
	Timeout    time.Duration
	TrackerTtl time.Duration
}

func (*ClientSetOptions) Apply

func (s *ClientSetOptions) Apply(opts ...ClientSetOption)

type RequestOption

type RequestOption func(*RequestOptions)

func WithUnredacted

func WithUnredacted() RequestOption

type RequestOptions

type RequestOptions struct {
	Unredacted bool
}

func (*RequestOptions) Apply

func (o *RequestOptions) Apply(opts ...RequestOption)

type SyncOption

type SyncOption func(*SyncOptions)

func WithDefaultReceiver added in v0.11.0

func WithDefaultReceiver(cfg *config.WebhookConfig) SyncOption

func WithInitialRouter

func WithInitialRouter(router routing.OpniRouting) SyncOption

func WithSyncTimeout

func WithSyncTimeout(timeout time.Duration) SyncOption

type SyncOptions

type SyncOptions struct {
	Router          routing.OpniRouting
	DefaultReceiver *config.WebhookConfig
	Timeout         time.Duration
}

func NewSyncOptions

func NewSyncOptions() *SyncOptions

func (*SyncOptions) Apply

func (o *SyncOptions) Apply(opts ...SyncOption)

Jump to

Keyboard shortcuts

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