addserver

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidAddress            = errors.New("invalid address")
	ErrUnableToCreateServer      = errors.New("unable to create server")
	ErrUnableToDiscoverServer    = errors.New("unable to discover server")
	ErrServerDiscoveryInProgress = errors.New("server discovery is in progress")
	ErrServerHasNoQueryablePort  = errors.New("server has no queryable port")
)

Functions

This section is empty.

Types

type UseCase

type UseCase struct {
	// contains filtered or unexported fields
}

func New

func New(
	serverRepo repositories.ServerRepository,
	probeRepo repositories.ProbeRepository,
	opts UseCaseOptions,
	metrics *metrics.Collector,
	logger *zerolog.Logger,
) UseCase

func (UseCase) Execute

func (uc UseCase) Execute(ctx context.Context, publicAddr addr.PublicAddr) (server.Server, error)

type UseCaseOptions added in v0.14.0

type UseCaseOptions struct {
	MaxProbeRetries int
}

Jump to

Keyboard shortcuts

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