Documentation ¶
Index ¶
- Constants
- func Connect(hosts []string, secret string, opts ...nats.Option) (*nats.Conn, error)
- func NewTLSConfig(secret string) (tlsc *tls.Config)
- func WithAutoDialer(secret string) nats.Option
- func WithDialFunc(d func(network, address string) (net.Conn, error)) nats.Option
- func WithSystemAccount() nats.Option
- type Logger
- type Options
- type Server
- func (s *Server) ClientURL() string
- func (s *Server) Close() error
- func (s *Server) Connect(opts ...nats.Option) (*nats.Conn, error)
- func (s *Server) Done() <-chan struct{}
- func (s *Server) InProcessConn() (net.Conn, error)
- func (s *Server) Ready() <-chan struct{}
- func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Server) Server() *natssrv.Server
- func (s *Server) Shutdown(ctx context.Context) error
- type Topology
Constants ¶
View Source
const ServerStartTimeout = 5 * time.Minute
Variables ¶
This section is empty.
Functions ¶
func NewTLSConfig ¶
func WithAutoDialer ¶
func WithAutoDialer(secret string) nats.Option
func WithDialFunc ¶
func WithSystemAccount ¶
func WithSystemAccount() nats.Option
Types ¶
type Options ¶
type Options struct { Debug bool ServerName string // Name of the server ClusterName string // Name of the cluster StoreDir string // Directory to store data LocalAddr string // Address we bind to for strictly local connections LocalPort int // Port to bind to for strictly local connections Addr string // Address we bind to Advertise string // Address we advertise as Port int // Port to bind to for remote connections Secret string // Secret for interserver communication Logger *xlog.Logger // Logger to use TLSConfig *tls.Config // TLS configuration Topology Topology // Topology to use for bootstrapping }
func (*Options) SetDefaults ¶
func (opts *Options) SetDefaults()
type Topology ¶
func DiscoverTopologyConn ¶
Click to show internal directories.
Click to hide internal directories.