Documentation ¶
Index ¶
- func ConfigAdd(path string)
- func NewPublisherRegister() ginats.PublisherMiddleware
- func NewPublisherRegisterWithConfigPath(path string) (ginats.PublisherMiddleware, error)
- func NewPublisherRegisterWithOptions(options *Options) ginats.PublisherMiddleware
- func Register(msgHandler nats.MsgHandler) nats.MsgHandler
- type Options
- type Publisher
- type Subscriber
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPublisherRegister ¶
func NewPublisherRegister() ginats.PublisherMiddleware
NewPublisherRegister returns a new newrelic plugin with default options.
func NewPublisherRegisterWithConfigPath ¶
func NewPublisherRegisterWithConfigPath(path string) (ginats.PublisherMiddleware, error)
NewPublisherRegisterWithConfigPath returns a new newrelic plugin with options from config path.
func NewPublisherRegisterWithOptions ¶
func NewPublisherRegisterWithOptions(options *Options) ginats.PublisherMiddleware
NewPublisherRegisterWithOptions returns a new newrelic plugin with options.
Types ¶
type Options ¶
type Options struct {
Enabled bool
}
Options newrelic plugin for nats options.
func NewOptions ¶
NewOptions returns options from config file or environment vars.
func NewOptionsWithPath ¶
NewOptionsWithPath unmarshals options based a given key path.
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher represents newrelic plugin for nats publisher.
func (*Publisher) After ¶
After finishes the newrelic.MessageProducerSegment (https://godoc.org/github.com/newrelic/go-agent#MessageProducerSegment) on context.
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
Subscriber represents newrelic plugin for nats subscriber.
func NewSubscriber ¶
func NewSubscriber() *Subscriber
NewSubscriber returns a new newrelic plugin with default options.
func NewSubscriberWithConfigPath ¶
func NewSubscriberWithConfigPath(path string) (*Subscriber, error)
NewSubscriberWithConfigPath returns a new newrelic plugin with options from config path.
func NewSubscriberWithOptions ¶
func NewSubscriberWithOptions(options *Options) *Subscriber
NewSubscriberWithOptions returns a new newrelic plugin with options.
func (*Subscriber) Register ¶
func (p *Subscriber) Register(msgHandler nats.MsgHandler) nats.MsgHandler
Register registers this newrelic plugin for nats subscriber.