forwarder

package
v0.0.0-...-ea65d50 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

package forwarder provides a facility for forwarding messages to another tassis cluster

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dial

type Dial func(host string) (service.ClientConnection, error)

Dial is a function that connects to a tassis host

type Forwarder

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

Forwarder is a forwarder that connects to other tassis clusters using a Connect function

func New

func New(dial Dial) *Forwarder

New constructs a new Forwarder using the specified dial function

func (*Forwarder) Forward

func (f *Forwarder) Forward(msg *model.ForwardedMessage, tassisHost string, finished func(error))

Forward forwards the given message to specified tassisHost. Once it receives an ack or error response, it calls finished. If finished receives a nil error, that means the message was forwarded successfully.

Directories

Path Synopsis
memforwarder provides an implementation of forwarder using process-local in-memory services
memforwarder provides an implementation of forwarder using process-local in-memory services
webforwarder provides an implementation of forwarder by dialing webclient connections
webforwarder provides an implementation of forwarder by dialing webclient connections

Jump to

Keyboard shortcuts

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