standard

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 8 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parameter

type Parameter interface {
	// contains filtered or unexported methods
}

Parameter is the interface for service parameters.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the module.

type Service

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

Service is the standard majordomo service.

func New

func New(ctx context.Context, params ...Parameter) (*Service, error)

New creates a new majordomo instance. Confidants must be added to the instance with `RegisterConfidant()`

func (*Service) Fetch

func (s *Service) Fetch(ctx context.Context, req string) ([]byte, error)

Fetch fetches a URL from a confidant.

func (*Service) RegisterConfidant

func (s *Service) RegisterConfidant(ctx context.Context, confidant majordomo.Confidant) error

RegisterConfidant registers a confidant. The confidant will register whichever URL schemes it supports.

Jump to

Keyboard shortcuts

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