proxy

package
v0.0.0-...-4ede2c6 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultReconnectBufferSize = 5 * 1024 * 1024

Defaultreconnectbuffersize is the default size of the buffer for cache reconnect msgs

View Source
const DefaultReconnectionAttemts = 5

DefaultReconnectionAttemts is the default number of reconnection attempts It implements a hard coded fault tolerance for a starting NATS cluster

View Source
const DefaultReconnectionWait = 5 * time.Second

DefaultReconnectionWait is the default wating time between each reconnection attempt

View Source
const JetStreamTActions = "amiproxy"

Variables

View Source
var (
	Verbose *bool
)

Functions

This section is empty.

Types

type Options

type Options struct {
	//Chatty
	Verbose *bool

	// Usually localhost
	Host string

	//Port to open the asterisk server
	Port int

	// Username for ARI authentication
	Username string

	// Password for ARI authentication
	Password string

	// Allow subscribe to all events in Asterisk Server
	Events string
}

Options describes the options for connecting to a native Asterisk AMI- server.

type Server

type Server struct {

	// MBPrefix is the string which should be prepended to all MessageBus subjects, sending and receiving.
	// It defaults to "ami.".
	MBPrefix string

	ConnectedServer string

	// MBPrefix is the string which should be add to the end to all MessageBus subjects, sending and receiving.
	// It defaults to ".>".
	MBPostfix string

	TopicSeparator string

	Verbose *bool
	// contains filtered or unexported fields
}

func New

func New(c amilib.Config) *Server

func (*Server) Close

func (s *Server) Close()

func (*Server) Listen

func (s *Server) Listen(ctx context.Context) error

func (*Server) Ready

func (s *Server) Ready() <-chan struct{}

Ready returns a channel which is closed when the Server is ready

func (*Server) SetLogHandler

func (s *Server) SetLogHandler(log zerolog.Logger)

Jump to

Keyboard shortcuts

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