internal

package
v0.0.0-...-5ca518f Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version set by the build system.
	Version = "dev"
	// Commit set by the build system.
	Commit = ""
	// Date set by the build system.
	Date = ""
)

Functions

func NewRouter

func NewRouter(opts ...Option) *core.Router

Types

type Option

type Option func(*RouterConfig)

func WithEnableTelemetry

func WithEnableTelemetry(enable bool) Option

func WithGraphApiToken

func WithGraphApiToken(token string) Option

func WithHttpPort

func WithHttpPort(port string) Option

func WithLogger

func WithLogger(logger *zap.Logger) Option

func WithRouterConfigPath

func WithRouterConfigPath(path string) Option

func WithRouterOpts

func WithRouterOpts(opts ...core.Option) Option

func WithStage

func WithStage(stage string) Option

func WithTelemetryServiceName

func WithTelemetryServiceName(name string) Option

func WithTraceSampleRate

func WithTraceSampleRate(rate float64) Option

type RouterConfig

type RouterConfig struct {
	RouterConfigPath     string
	TelemetryServiceName string
	RouterOpts           []core.Option
	GraphApiToken        string
	HttpPort             string
	EnableTelemetry      bool
	Stage                string
	TraceSampleRate      float64
	Logger               *zap.Logger
}

Jump to

Keyboard shortcuts

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