config

package
v0.0.0-...-8fcfbba Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: LGPL-3.0 Imports: 7 Imported by: 1

Documentation

Overview

This package defines a common config struct which can be used by any subsystem within slick.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug                    bool
	RootDir                  string
	AckWaitTimeMs            int64
	GroupMessageWaitTimeMs   int64
	PrivateMessageWaitTimeMs int64
	LookupTimeoutMs          int64
	RequestTimeoutMs         int64
	LoggingPrefix            string
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(opts ...Option) *Config

func (Config) Logger

func (c Config) Logger(source string) *zap.SugaredLogger

type Option

type Option func(*Config)

func WithAckWaitTimeMs

func WithAckWaitTimeMs(n int64) Option

func WithDebug

func WithDebug(d bool) Option

func WithGroupMessageWaitTimeMs

func WithGroupMessageWaitTimeMs(n int64) Option

func WithLoggingPrefix

func WithLoggingPrefix(p string) Option

func WithPrivateMessageWaitTimeMs

func WithPrivateMessageWaitTimeMs(n int64) Option

func WithRootDir

func WithRootDir(d string) Option

Jump to

Keyboard shortcuts

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