ariproxy

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package ariproxy provides a proxy for ARI calls. It is usable via the client/nc Client and can use any given ari.Client

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler func(subj string, request []byte, reply Reply)

Handler is left for compat

type Handler2

type Handler2 func(msg *session.Message, reply Reply)

A Handler2 is a function which provides a session-aware request-response for nats

type Instance

type Instance struct {
	Dialog *session.Dialog
	// contains filtered or unexported fields
}

An Instance is the server-side component of a dialog

func (*Instance) Start

func (i *Instance) Start(ctx context.Context)

Start runs the server side instance

func (*Instance) Stop

func (i *Instance) Stop()

Stop stops the instance

type Options

type Options struct {
	URL string

	Logger log15.Logger
	Parent context.Context
}

Options are the group of options for the ari-proxy server

type Reply

type Reply func(interface{}, error)

Reply is a function which, when called, replies to the request via the response object or error.

type Server

type Server struct {
	ID          string // server identifier
	Application string // name of the asterisk application this gateway is serving
	// contains filtered or unexported fields
}

Server is the nats gateway server

func NewServer

func NewServer(client *ari.Client, application string, opts *Options) (srv *Server, err error)

NewServer creates a new nats gw server

func (*Server) Close

func (srv *Server) Close()

Close closes the gateway server

func (*Server) Start

func (srv *Server) Start()

Start starts the service and listens for nats requests and delegates them to the upstream ARI client

Jump to

Keyboard shortcuts

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