config

package
v0.2400.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package config implements global configuration options.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Enable Sentry worker.
	// NOTE: This should only be enabled on Sentry nodes.
	Enabled bool `yaml:"enabled"`

	Control ControlConfig `yaml:"control,omitempty"`
}

Config is the sentry worker configuration structure.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns the default configuration settings.

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the configuration settings.

type ControlConfig

type ControlConfig struct {
	// Sentry worker's gRPC server port.
	Port uint16 `yaml:"port"`

	// Public keys of upstream nodes that are allowed to connect to sentry control endpoint.
	AuthorizedPubkeys []string `yaml:"authorized_pubkeys"`
}

ControlConfig is the sentry worker control configuration structure.

Jump to

Keyboard shortcuts

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