natsbridge

package
v0.0.0-...-48d2764 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseGobalNatsOption

func ParseGobalNatsOption(d *caddyfile.Dispenser, existingVal interface{}) (interface{}, error)

Types

type NatsBridgeApp

type NatsBridgeApp struct {
	// Immutable after provisioning
	Servers map[string]*NatsServer `json:"servers,omitempty"`
	// contains filtered or unexported fields
}

NatsBridgeApp is the natsbridge nats bridge for Caddy.

NATS is a simple, secure and performant communications system for digital systems, services and devices.

func (NatsBridgeApp) CaddyModule

func (app NatsBridgeApp) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*NatsBridgeApp) Provision

func (app *NatsBridgeApp) Provision(ctx caddy.Context) error

Provision sets up the app

func (*NatsBridgeApp) Start

func (app *NatsBridgeApp) Start() error

func (*NatsBridgeApp) Stop

func (app *NatsBridgeApp) Stop() error

func (*NatsBridgeApp) UnmarshalCaddyfile

func (app *NatsBridgeApp) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

type NatsServer

type NatsServer struct {
	// can also contain comma-separated list of URLs, see nats.Connect
	NatsUrl            string `json:"url,omitempty"`
	UserCredentialFile string `json:"userCredentialFile,omitempty"`
	NkeyCredentialFile string `json:"nkeyCredentialFile,omitempty"`
	ClientName         string `json:"clientName,omitempty"`
	InboxPrefix        string `json:"inboxPrefix,omitempty"`

	HandlersRaw []json.RawMessage `json:"handle,omitempty" caddy:"namespace=nats.handlers inline_key=handler"`

	// Decoded values
	Handlers []common.NatsHandler `json:"-"`

	Conn *nats.Conn `json:"-"`
}

Jump to

Keyboard shortcuts

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