Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NATSListenAndServeLoopTimer = 1 * time.Second
Functions ¶
This section is empty.
Types ¶
type NATSServer ¶
type NATSServer struct {
// contains filtered or unexported fields
}
func NewNATSServer ¶
func NewNATSServer(ctx context.Context, logger nserver.Logger, opts ...NatsOption) (*NATSServer, error)
func (*NATSServer) ListenAndServe ¶
func (n *NATSServer) ListenAndServe() (err error)
ListenAndServe runs the NATSServer in a blocking way until the server is shutdown or an error occurs
func (*NATSServer) Shutdown ¶
func (n *NATSServer) Shutdown()
type NatsOption ¶
NatsOption configures the nats server
func AllowNonTLS ¶
func AllowNonTLS(v bool) NatsOption
AllowNonTLS sets the allow non tls options for the nats server
func ClusterID ¶
func ClusterID(clusterID string) NatsOption
ClusterID sets the name for the nats cluster
func TLSConfig ¶
func TLSConfig(c *tls.Config) NatsOption
TLSConfig sets the tls config for the nats server
Click to show internal directories.
Click to hide internal directories.