pg

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 License: BSD-2-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name is the name by which this peer store is registered with Conf.
	Name = "pg"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ConnectionString   string `cfg:"connection_string"`
	PingQuery          string `cfg:"ping_query"`
	Peer               peerQueryConf
	Announce           announceQueryConf
	Data               dataQueryConf
	GCQuery            string `cfg:"gc_query"`
	InfoHashCountQuery string `cfg:"info_hash_count_query"`
}

Config holds the configuration of a redis PeerStorage.

func (Config) MarshalZerologObject

func (cfg Config) MarshalZerologObject(e *zerolog.Event)

MarshalZerologObject writes configuration fields into zerolog event

func (Config) Validate

func (cfg Config) Validate() (Config, error)

Validate sanity checks values set in a config and returns a new config with default values replacing anything that is invalid.

This function warns to the logger when a value is changed.

Jump to

Keyboard shortcuts

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