Documentation ¶
Index ¶
- Constants
- func RoutesFromSlice(routes []string, allowLocal bool) ([]*url.URL, error)
- func RoutesFromStr(routesStr string, allowLocal bool) ([]*url.URL, error)
- type ClientManager
- type ServerManager
- type ServerManagerParams
- type ZeroLogger
- func (l ZeroLogger) Debugf(format string, v ...interface{})
- func (l ZeroLogger) Errorf(format string, v ...interface{})
- func (l ZeroLogger) Fatalf(format string, v ...interface{})
- func (l ZeroLogger) Noticef(format string, v ...interface{})
- func (l ZeroLogger) Tracef(format string, v ...interface{})
- func (l ZeroLogger) Warnf(format string, v ...interface{})
Constants ¶
View Source
const ReadyForConnectionsTimeout = 5 * time.Second
Variables ¶
This section is empty.
Functions ¶
func RoutesFromSlice ¶
RoutesFromSlice parses route URLs from a slice of strings
Types ¶
type ClientManager ¶
type ClientManager struct {
Client *nats.Conn
}
func NewClientManager ¶
func NewClientManager(ctx context.Context, servers string, options ...nats.Option) (*ClientManager, error)
NewClientManager is a helper function to create a NATS client connection with a given name and servers string
func (*ClientManager) GetDebugInfo ¶
DebugInfo returns the debug info of the NATS client
type ServerManager ¶
ServerManager is a helper struct to manage a NATS server
func NewServerManager ¶
func NewServerManager(ctx context.Context, params ServerManagerParams) (*ServerManager, error)
NewServerManager is a helper function to create a NATS server with a given options
func (*ServerManager) GetDebugInfo ¶
GetDebugInfo returns the debug info of the NATS server
type ServerManagerParams ¶
type ZeroLogger ¶
type ZeroLogger struct {
// contains filtered or unexported fields
}
ZeroLogger is a wrapper around zerolog.Logger to implement the NATS Logger interface
func NewZeroLogger ¶
func NewZeroLogger(logger zerolog.Logger, serverID string) ZeroLogger
NewZeroLogger creates a new ZeroLogger
func (ZeroLogger) Debugf ¶
func (l ZeroLogger) Debugf(format string, v ...interface{})
func (ZeroLogger) Errorf ¶
func (l ZeroLogger) Errorf(format string, v ...interface{})
func (ZeroLogger) Fatalf ¶
func (l ZeroLogger) Fatalf(format string, v ...interface{})
func (ZeroLogger) Noticef ¶
func (l ZeroLogger) Noticef(format string, v ...interface{})
func (ZeroLogger) Tracef ¶
func (l ZeroLogger) Tracef(format string, v ...interface{})
func (ZeroLogger) Warnf ¶
func (l ZeroLogger) Warnf(format string, v ...interface{})
Click to show internal directories.
Click to hide internal directories.