libparodus

package
v0.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidInput = errors.New("invalid input")
	ErrNoService    = errors.New("service not found")
)

Functions

This section is empty.

Types

type Adapter

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

Adapter is a struct representing a service that listens for messages from libparodus and forwards them to the appropriate service. It also listens for messages from the appropriate service and forwards them to libparodus.

func New

func New(url string, pubsub *pubsub.PubSub, opts ...Option) (*Adapter, error)

New creates a new Service with the given options.

func (*Adapter) Start

func (a *Adapter) Start() error

Start starts the service. If the service is already started, this function does nothing. If an error occurs, it is not recoverable and the service can not be started.

func (*Adapter) Stop

func (s *Adapter) Stop()

Stop stops the service. If the service is already stopped, this function does nothing.

type Option

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

Option is the interface implemented by types that can be used to configure the service.

func KeepaliveInterval

func KeepaliveInterval(timeout time.Duration) Option

func ReceiveTimeout

func ReceiveTimeout(timeout time.Duration) Option

func SendTimeout

func SendTimeout(timeout time.Duration) Option

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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