linksharing

package
v1.77.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server  httpserver.Config
	Handler sharing.Config

	// ShutdownDelay is how long to wait until Shutdown is called. During
	// the delay the health endpoint should return 503s to allow a load
	// balancer time to re-route requests.
	ShutdownDelay time.Duration

	// Maxmind geolocation database path.
	GeoLocationDB string
}

Config contains configurable values for sno registration Peer.

type Peer

type Peer struct {
	Log        *zap.Logger
	Mapper     *objectmap.IPDB
	Server     *httpserver.Server
	TXTRecords *sharing.TXTRecords
	// contains filtered or unexported fields
}

Peer is the representation of a Linksharing service itself.

architecture: Peer

func New

func New(log *zap.Logger, config Config) (_ *Peer, err error)

New is a constructor for Linksharing Peer.

func (*Peer) Close

func (peer *Peer) Close() error

Close shuts down the server and all underlying resources.

func (*Peer) Run

func (peer *Peer) Run(ctx context.Context) (err error)

Run starts the server.

Directories

Path Synopsis
internal/signed
Package signed provides verification of requests signed with AWS Signature Version 4 machinery.
Package signed provides verification of requests signed with AWS Signature Version 4 machinery.

Jump to

Keyboard shortcuts

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