Versions in this module Expand all Collapse all v1 v1.2.2 Sep 17, 2020 v1.2.1 Sep 16, 2020 v1.2.0 Sep 16, 2020 Changes in this version + const ACCEPT_MAX_SLEEP + const ACCEPT_MIN_SLEEP + const ACCOUNT + const ASUB_ARG + const AUSUB_ARG + const AUTH_TIMEOUT + const AuthenticationExpired + const AuthenticationTimeout + const AuthenticationViolation + const BadClientProtocolVersion + const CLIENT + const CONNECT_ARG + const CR_LF + const ClientClosed + const ClientProtoInfo + const ClientProtoZero + const ClusterNameConflict + const CommandQuit + const CommandReload + const CommandReopen + const CommandStop + const ConProto + const ConnAll + const ConnClosed + const ConnOpen + const ConnectEventMsgType + const ConnzPath + const DEFAULT_ALLOW_RESPONSE_EXPIRATION + const DEFAULT_ALLOW_RESPONSE_MAX_MSGS + const DEFAULT_CONNECT_ERROR_REPORTS + const DEFAULT_FLUSH_DEADLINE + const DEFAULT_GLOBAL_ACCOUNT + const DEFAULT_HOST + const DEFAULT_HTTP_BASE_PATH + const DEFAULT_HTTP_PORT + const DEFAULT_LAME_DUCK_DURATION + const DEFAULT_LAME_DUCK_GRACE_PERIOD + const DEFAULT_LEAFNODE_INFO_WAIT + const DEFAULT_LEAFNODE_PORT + const DEFAULT_LEAF_NODE_RECONNECT + const DEFAULT_LEAF_TLS_TIMEOUT + const DEFAULT_MAX_CLOSED_CLIENTS + const DEFAULT_MAX_CONNECTIONS + const DEFAULT_PING_INTERVAL + const DEFAULT_PING_MAX_OUT + const DEFAULT_PORT + const DEFAULT_RECONNECT_ERROR_REPORTS + const DEFAULT_ROUTE_CONNECT + const DEFAULT_ROUTE_DIAL + const DEFAULT_ROUTE_RECONNECT + const DEFAULT_RTT_MEASUREMENT_INTERVAL + const DEFAULT_SCTP_PING_INTERVAL + const DEFAULT_SERVICE_EXPORT_RESPONSE_THRESHOLD + const DEFAULT_SERVICE_LATENCY_SAMPLING + const DEFAULT_SYSTEM_ACCOUNT + const DefaultConnListSize + const DefaultSubListSize + const DiscardNew + const DiscardOld + const DisconnectEventMsgType + const DuplicateRoute + const GATEWAY + const GatewayzPath + const HMSG_ARG + const HPUB_ARG + const INFO_ARG + const InboxPrefix + const InfoProto + const InternalClient + const JETSTREAM + const JSAPIAuditType + const JSAdvisoryConsumerCreatedPre + const JSAdvisoryConsumerDeletedPre + const JSAdvisoryConsumerMaxDeliveryExceedPre + const JSAdvisoryConsumerMsgTerminatedPre + const JSAdvisoryPrefix + const JSAdvisoryStreamCreatedPre + const JSAdvisoryStreamDeletedPre + const JSAdvisoryStreamRestoreCompletePre + const JSAdvisoryStreamRestoreCreatePre + const JSAdvisoryStreamSnapshotCompletePre + const JSAdvisoryStreamSnapshotCreatePre + const JSAdvisoryStreamUpdatedPre + const JSApiAccountInfo + const JSApiAccountInfoResponseType + const JSApiConsumerCreate + const JSApiConsumerCreateResponseType + const JSApiConsumerCreateT + const JSApiConsumerDelete + const JSApiConsumerDeleteResponseType + const JSApiConsumerDeleteT + const JSApiConsumerInfo + const JSApiConsumerInfoResponseType + const JSApiConsumerInfoT + const JSApiConsumerList + const JSApiConsumerListResponseType + const JSApiConsumerListT + const JSApiConsumerNamesResponseType + const JSApiConsumers + const JSApiConsumersT + const JSApiDurableCreate + const JSApiDurableCreateT + const JSApiListLimit + const JSApiMsgDelete + const JSApiMsgDeleteResponseType + const JSApiMsgDeleteT + const JSApiMsgGet + const JSApiMsgGetResponseType + const JSApiMsgGetT + const JSApiNamesLimit + const JSApiRequestNextT + const JSApiStreamCreate + const JSApiStreamCreateResponseType + const JSApiStreamCreateT + const JSApiStreamDelete + const JSApiStreamDeleteResponseType + const JSApiStreamDeleteT + const JSApiStreamInfo + const JSApiStreamInfoResponseType + const JSApiStreamInfoT + const JSApiStreamList + const JSApiStreamListResponseType + const JSApiStreamNamesResponseType + const JSApiStreamPurge + const JSApiStreamPurgeResponseType + const JSApiStreamPurgeT + const JSApiStreamRestore + const JSApiStreamRestoreResponseType + const JSApiStreamRestoreT + const JSApiStreamSnapshot + const JSApiStreamSnapshotResponseType + const JSApiStreamSnapshotT + const JSApiStreamTemplateCreateResponseType + const JSApiStreamTemplateDeleteResponseType + const JSApiStreamTemplateInfoResponseType + const JSApiStreamTemplateNamesResponseType + const JSApiStreamUpdate + const JSApiStreamUpdateResponseType + const JSApiStreamUpdateT + const JSApiStreams + const JSApiTemplateCreate + const JSApiTemplateCreateT + const JSApiTemplateDelete + const JSApiTemplateDeleteT + const JSApiTemplateInfo + const JSApiTemplateInfoT + const JSApiTemplates + const JSAuditAdvisory + const JSConsumerAckMetricType + const JSConsumerActionAdvisoryType + const JSConsumerDeliveryExceededAdvisoryType + const JSConsumerDeliveryTerminatedAdvisoryType + const JSMaxNameLen + const JSMetricConsumerAckPre + const JSMetricPrefix + const JSPubId + const JSRestoreCompleteAdvisoryType + const JSRestoreCreateAdvisoryType + const JSSnapshotCompleteAdvisoryType + const JSSnapshotCreatedAdvisoryType + const JSStreamActionAdvisoryType + const JetStreamMaxMemDefault + const JetStreamMaxStoreDefault + const JetStreamMetaFile + const JetStreamMetaFileSum + const JetStreamStoreDir + const JsAckWaitDefault + const JsDeleteWaitTimeDefault + const LEAF + const LEN_CR_LF + const LeafzPath + const MAX_CONTROL_LINE_SIZE + const MAX_HMSG_ARGS + const MAX_HPUB_ARGS + const MAX_MSG_ARGS + const MAX_PAYLOAD_SIZE + const MAX_PENDING_SIZE + const MAX_PUB_ARGS + const MAX_RMSG_ARGS + const MINUS_ERR_ARG + const MSG_ARG + const MSG_END_N + const MSG_END_R + const MSG_PAYLOAD + const MaxAccountConnectionsExceeded + const MaxConnectionsExceeded + const MaxControlLineExceeded + const MaxPayloadExceeded + const MaxSubscriptionsExceeded + const MissingAccount + const MsgHeaderViolation + const NoRespondersRequiresHeaders + const OK + const OP_A + const OP_ASUB + const OP_ASUB_SPC + const OP_AUSUB + const OP_AUSUB_SPC + const OP_C + const OP_CO + const OP_CON + const OP_CONN + const OP_CONNE + const OP_CONNEC + const OP_CONNECT + const OP_H + const OP_HM + const OP_HMS + const OP_HMSG + const OP_HMSG_SPC + const OP_HP + const OP_HPU + const OP_HPUB + const OP_HPUB_SPC + const OP_I + const OP_IN + const OP_INF + const OP_INFO + const OP_L + const OP_LS + const OP_M + const OP_MINUS + const OP_MINUS_E + const OP_MINUS_ER + const OP_MINUS_ERR + const OP_MINUS_ERR_SPC + const OP_MS + const OP_MSG + const OP_MSG_SPC + const OP_P + const OP_PI + const OP_PIN + const OP_PING + const OP_PLUS + const OP_PLUS_O + const OP_PLUS_OK + const OP_PO + const OP_PON + const OP_PONG + const OP_PU + const OP_PUB + const OP_PUB_SPC + const OP_R + const OP_RS + const OP_S + const OP_START + const OP_SU + const OP_SUB + const OP_SUB_SPC + const OP_U + const OP_UN + const OP_UNS + const OP_UNSU + const OP_UNSUB + const OP_UNSUB_SPC + const PROTO + const PROTO_SNIPPET_SIZE + const PUB_ARG + const ParseError + const ProtocolViolation + const RANDOM_PORT + const ROUTER + const ReadError + const Revocation + const RootPath + const RouteProtoInfo + const RouteProtoV2 + const RouteProtoZero + const RouteRemoved + const RoutezPath + const SUB_ARG + const SYSTEM + const ServerShutdown + const ServiceLatencyType + const SlowConsumerPendingBytes + const SlowConsumerWriteDeadline + const StackszPath + const StaleConnection + const StreamDefaultDuplicatesWindow + const StreamDefaultReplicas + const StreamMaxReplicas + const SubszPath + const TLSHandshakeError + const TLS_TIMEOUT + const UNSUB_ARG + const VERSION + const VarzPath + const WriteError + const WrongGateway + const WrongPort + var AckAck = []byte("+ACK") + var AckNak = []byte("-NAK") + var AckNext = []byte("+NXT") + var AckOK = []byte(OK) + var AckProgress = []byte("+WPI") + var AckTerm = []byte("+TERM") + var ErrAccountExists = errors.New("account exists") + var ErrAccountExpired = errors.New("account expired") + var ErrAccountResolverSameClaims = errors.New("account resolver no new claims") + var ErrAccountResolverUpdateTooSoon = errors.New("account resolver update too soon") + var ErrAccountValidation = errors.New("account validation failed") + var ErrAlreadyRegistered = errors.New("sublist: notification already registered") + var ErrAuthExpired = errors.New("authentication expired") + var ErrAuthTimeout = errors.New("authentication timeout") + var ErrAuthentication = errors.New("authentication error") + var ErrBadAccount = errors.New("bad account") + var ErrBadClientProtocol = errors.New("invalid client protocol") + var ErrBadMsgHeader = errors.New("bad message header detected") + var ErrBadPublishSubject = errors.New("invalid publish subject") + var ErrBadSampling = errors.New("bad sampling percentage, should be 1-100") + var ErrBadServiceType = errors.New("bad service response type") + var ErrClientConnectedToLeafNodePort = errors.New("attempted to connect to leaf node port") + var ErrClientConnectedToRoutePort = errors.New("attempted to connect to route port") + var ErrClientOrRouteConnectedToGatewayPort = errors.New("attempted to connect to gateway port") + var ErrClusterNameConfigConflict = errors.New("cluster name conflicts between cluster and gateway definitions") + var ErrClusterNameRemoteConflict = errors.New("cluster name from remote server conflicts") + var ErrConnectedToWrongPort = errors.New("attempted to connect to wrong port") + var ErrConnectionClosed = errors.New("connection closed") + var ErrInvalidSubject = errors.New("sublist: invalid subject") + var ErrMalformedSubject = errors.New("malformed subject") + var ErrMaxBytes = errors.New("maximum bytes exceeded") + var ErrMaxControlLine = errors.New("maximum control line exceeded") + var ErrMaxMsgs = errors.New("maximum messages exceeded") + var ErrMaxPayload = errors.New("maximum payload exceeded") + var ErrMissingAccount = errors.New("account missing") + var ErrMissingService = errors.New("service missing") + var ErrMsgHeadersNotSupported = errors.New("message headers not supported") + var ErrMsgTooLarge = errors.New("message to large") + var ErrNilChan = errors.New("sublist: nil channel") + var ErrNoAccountResolver = errors.New("account resolver missing") + var ErrNoRespondersRequiresHeaders = errors.New("no responders requires headers support") + var ErrNoSysAccount = errors.New("system account not setup") + var ErrNotFound = errors.New("sublist: no matches found") + var ErrReservedAccount = errors.New("reserved account") + var ErrReservedPublishSubject = errors.New("reserved internal subject") + var ErrRevocation = errors.New("credentials have been revoked") + var ErrServerNotRunning = errors.New("server is not running") + var ErrServiceImportAuthorization = errors.New("service import not authorized") + var ErrStoreClosed = errors.New("store is closed") + var ErrStoreEOF = errors.New("stream EOF") + var ErrStoreMsgNotFound = errors.New("no message found") + var ErrStoreSnapshotInProgress = errors.New("snapshot in progress") + var ErrStreamImportAuthorization = errors.New("stream import not authorized") + var ErrStreamImportBadPrefix = errors.New("stream import prefix can not contain wildcard tokens") + var ErrStreamImportDuplicate = errors.New("stream import already exists") + var ErrSubscribePermissionViolation = errors.New("subscribe permission viloation") + var ErrTooManyAccountConnections = errors.New("maximum account active connections exceeded") + var ErrTooManyConnections = errors.New("maximum connections exceeded") + var ErrTooManySubs = errors.New("maximum subscriptions exceeded") + var ErrWrongGateway = errors.New("wrong gateway") + var IsPublicExport = []*Account(nil) + func CanonicalName(name string) string + func ErrorIs(err, target error) bool + func FriendlyBytes(bytes int64) string + func GenTLSConfig(tc *TLSConfigOpts) (*tls.Config, error) + func IsValidLiteralSubject(subject string) bool + func IsValidPublishSubject(subject string) bool + func IsValidSubject(subject string) bool + func NewErrorCtx(err error, format string, args ...interface{}) error + func NoErrOnUnknownFields(noError bool) + func PrintAndDie(msg string) + func PrintServerAndExit() + func PrintTLSHelpAndDie() + func ProcessCommandLineArgs(cmd *flag.FlagSet) (showVersion bool, showHelp bool, err error) + func ProcessSignal(command Command, pidStr string) error — darwin/amd64, js/wasm, linux/amd64 + func ProcessSignal(command Command, service string) error — windows/amd64 + func ReadOperatorJWT(jwtfile string) (*jwt.OperatorClaims, error) + func RemoveSelfReference(clusterPort int, routes []*url.URL) ([]*url.URL, error) + func ResetGatewaysSolicitDelay() + func ResponseHandler(w http.ResponseWriter, r *http.Request, data []byte) + func RoutesFromStr(routesStr string) []*url.URL + func Run(server *Server) error + func SetGatewaysSolicitDelay(delay time.Duration) + func SetProcessName(name string) — darwin/amd64, js/wasm, linux/amd64 + func SetServiceName(name string) — windows/amd64 + func SubjectsCollide(subj1, subj2 string) bool + func UnpackIfErrorCtx(err error) string + type Account struct + Issuer string + Name string + Nkey string + func NewAccount(name string) *Account + func (a *Account) AddServiceExport(subject string, accounts []*Account) error + func (a *Account) AddServiceExportWithResponse(subject string, respType ServiceRespType, accounts []*Account) error + func (a *Account) AddServiceImport(destination *Account, from, to string) error + func (a *Account) AddServiceImportWithClaim(destination *Account, from, to string, imClaim *jwt.Import) error + func (a *Account) AddStream(config *StreamConfig) (*Stream, error) + func (a *Account) AddStreamExport(subject string, accounts []*Account) error + func (a *Account) AddStreamImport(account *Account, from, prefix string) error + func (a *Account) AddStreamImportWithClaim(account *Account, from, prefix string, imClaim *jwt.Import) error + func (a *Account) AddStreamTemplate(tc *StreamTemplateConfig) (*StreamTemplate, error) + func (a *Account) AddStreamWithStore(config *StreamConfig, fsConfig *FileStoreConfig) (*Stream, error) + func (a *Account) DeleteStreamTemplate(name string) error + func (a *Account) DisableJetStream() error + func (a *Account) EnableJetStream(limits *JetStreamAccountLimits) error + func (a *Account) GetName() string + func (a *Account) Interest(subject string) int + func (a *Account) IsExpired() bool + func (a *Account) IsExportService(service string) bool + func (a *Account) IsExportServiceTracking(service string) bool + func (a *Account) JetStreamEnabled() bool + func (a *Account) JetStreamUsage() JetStreamAccountStats + func (a *Account) LookupStream(name string) (*Stream, error) + func (a *Account) LookupStreamTemplate(name string) (*StreamTemplate, error) + func (a *Account) MaxActiveConnections() int + func (a *Account) MaxActiveLeafNodes() int + func (a *Account) MaxTotalConnectionsReached() bool + func (a *Account) MaxTotalLeafNodesReached() bool + func (a *Account) NumConnections() int + func (a *Account) NumLeafNodes() int + func (a *Account) NumLocalConnections() int + func (a *Account) NumPendingAllResponses() int + func (a *Account) NumPendingResponses(filter string) int + func (a *Account) NumPendingReverseResponses() int + func (a *Account) NumRemoteConnections() int + func (a *Account) NumRemoteLeafNodes() int + func (a *Account) NumServiceImports() int + func (a *Account) NumStreams() int + func (a *Account) RestoreStream(stream string, r io.Reader) (*Stream, error) + func (a *Account) RoutedSubs() int + func (a *Account) ServiceExportResponseThreshold(export string) (time.Duration, error) + func (a *Account) SetServiceExportResponseThreshold(export string, maxTime time.Duration) error + func (a *Account) SetServiceImportSharing(destination *Account, to string, allow bool) error + func (a *Account) Streams() []*Stream + func (a *Account) SubscriptionInterest(subject string) bool + func (a *Account) Templates() []*StreamTemplate + func (a *Account) TotalSubs() int + func (a *Account) TrackServiceExport(service, results string) error + func (a *Account) TrackServiceExportWithSampling(service, results string, sampling int) error + func (a *Account) UnTrackServiceExport(service string) + func (a *Account) UpdateJetStreamLimits(limits *JetStreamAccountLimits) error + type AccountGatewayz struct + InterestMode string + InterestOnlyThreshold int + Name string + NoInterestCount int + NumQueueSubscriptions int + TotalSubscriptions int + type AccountNumConns struct + Account string + Conns int + LeafNodes int + Server ServerInfo + TotalConns int + type AccountResolver interface + Close func() + Fetch func(name string) (string, error) + IsReadOnly func() bool + IsTrackingUpdate func() bool + Reload func() error + Start func(server *Server) error + Store func(name, jwt string) error + type AckPolicy int + const AckAll + const AckExplicit + const AckNone + func (a AckPolicy) String() string + func (ap *AckPolicy) UnmarshalJSON(data []byte) error + func (ap AckPolicy) MarshalJSON() ([]byte, error) + type ActionAdvisoryType string + const CreateEvent + const DeleteEvent + const ModifyEvent + type ApiError struct + Code int + Description string + type ApiPaged struct + Limit int + Offset int + Total int + type ApiPagedRequest struct + Offset int + type ApiResponse struct + Error *ApiError + Type string + type Authentication interface + Check func(c ClientAuthentication) bool + type CacheDirAccResolver struct + func NewCacheDirAccResolver(path string, limit int64, ttl time.Duration) (*CacheDirAccResolver, error) + func (dr *CacheDirAccResolver) Fetch(name string) (string, error) + func (dr *CacheDirAccResolver) Reload() error + func (dr *CacheDirAccResolver) Start(s *Server) error + type ClientAPIAudit struct + Account string + CID uint64 + Host string + Language string + Name string + Port int + User string + Version string + type ClientAuthentication interface + GetOpts func() *clientOpts + GetTLSConnectionState func() *tls.ConnectionState + RegisterUser func(*User) + RemoteAddress func() net.Addr + type ClientInfo struct + Account string + Host string + ID uint64 + Lang string + Name string + RTT string + Server string + Start time.Time + Stop *time.Time + User string + Version string + type ClosedState int + func (reason ClosedState) String() string + type ClusterOpts struct + Advertise string + AuthTimeout float64 + ConnectRetries int + Host string + ListenStr string + Name string + NoAdvertise bool + Password string + Permissions *RoutePermissions + Port int + TLSConfig *tls.Config + TLSMap bool + TLSTimeout float64 + Username string + type ClusterOptsVarz struct + AuthTimeout float64 + Host string + Name string + Port int + URLs []string + type Command string + type ConnInfo struct + Account string + AuthorizedUser string + Cid uint64 + IP string + Idle string + InBytes int64 + InMsgs int64 + Lang string + LastActivity time.Time + Name string + NumSubs uint32 + OutBytes int64 + OutMsgs int64 + Pending int + Port int + RTT string + Reason string + Start time.Time + Stop *time.Time + Subs []string + SubsDetail []SubDetail + TLSCipher string + TLSVersion string + Uptime string + Version string + type ConnInfos []*ConnInfo + func (cl ConnInfos) Len() int + func (cl ConnInfos) Swap(i, j int) + type ConnState int + type ConnectEventMsg struct + Client ClientInfo + Server ServerInfo + type Connz struct + Conns []*ConnInfo + ID string + Limit int + Now time.Time + NumConns int + Offset int + Total int + type ConnzEventOptions struct + type ConnzOptions struct + Account string + CID uint64 + Limit int + Offset int + Sort SortOpt + State ConnState + Subscriptions bool + SubscriptionsDetail bool + User string + Username bool + type Consumer struct + func (o *Consumer) Active() bool + func (o *Consumer) Config() ConsumerConfig + func (o *Consumer) Created() time.Time + func (o *Consumer) Delete() error + func (o *Consumer) Info() *ConsumerInfo + func (o *Consumer) Name() string + func (o *Consumer) NextSeq() uint64 + func (o *Consumer) ReplyInfo(reply string) (sseq, dseq, dcount uint64, ts int64) + func (o *Consumer) RequestNextMsgSubject() string + func (o *Consumer) SeqFromReply(reply string) uint64 + func (o *Consumer) SetInActiveDeleteThreshold(dthresh time.Duration) error + func (o *Consumer) Stop() error + func (o *Consumer) StreamSeqFromReply(reply string) uint64 + type ConsumerConfig struct + AckPolicy AckPolicy + AckWait time.Duration + DeliverPolicy DeliverPolicy + DeliverSubject string + Durable string + FilterSubject string + MaxDeliver int + OptStartSeq uint64 + OptStartTime *time.Time + RateLimit uint64 + ReplayPolicy ReplayPolicy + SampleFrequency string + type ConsumerInfo struct + AckFloor SequencePair + Config ConsumerConfig + Created time.Time + Delivered SequencePair + Name string + NumPending int + NumRedelivered int + Stream string + type ConsumerState struct + AckFloor SequencePair + Delivered SequencePair + Pending map[uint64]int64 + Redelivered map[uint64]uint64 + type ConsumerStore interface + Delete func() error + State func() (*ConsumerState, error) + Stop func() error + Update func(*ConsumerState) error + type CreateConsumerRequest struct + Config ConsumerConfig + Stream string + type DataStats struct + Bytes int64 + Msgs int64 + type DeliverPolicy int + const DeliverAll + const DeliverByStartSequence + const DeliverByStartTime + const DeliverLast + const DeliverNew + func (dp DeliverPolicy) String() string + func (p *DeliverPolicy) UnmarshalJSON(data []byte) error + func (p DeliverPolicy) MarshalJSON() ([]byte, error) + type DirAccResolver struct + func NewDirAccResolver(path string, limit int64, syncInterval time.Duration) (*DirAccResolver, error) + func (dr *DirAccResolver) Fetch(name string) (string, error) + func (dr *DirAccResolver) IsTrackingUpdate() bool + func (dr *DirAccResolver) Start(s *Server) error + func (dr *DirAccResolver) Store(name, jwt string) error + type DirJWTStore struct + func NewDirJWTStore(dirPath string, shard bool, create bool) (*DirJWTStore, error) + func NewExpiringDirJWTStore(dirPath string, shard bool, create bool, expireCheck time.Duration, ...) (*DirJWTStore, error) + func NewImmutableDirJWTStore(dirPath string, shard bool) (*DirJWTStore, error) + func (store *DirJWTStore) Close() + func (store *DirJWTStore) Hash() [sha256.Size]byte + func (store *DirJWTStore) IsReadOnly() bool + func (store *DirJWTStore) LoadAcc(publicKey string) (string, error) + func (store *DirJWTStore) LoadAct(hash string) (string, error) + func (store *DirJWTStore) Merge(pack string) error + func (store *DirJWTStore) Pack(maxJWTs int) (string, error) + func (store *DirJWTStore) PackWalk(maxJWTs int, cb func(partialPackMsg string)) error + func (store *DirJWTStore) Reload() error + func (store *DirJWTStore) SaveAcc(publicKey string, theJWT string) error + func (store *DirJWTStore) SaveAct(hash string, theJWT string) error + type DiscardPolicy int + func (dp *DiscardPolicy) UnmarshalJSON(data []byte) error + func (dp DiscardPolicy) MarshalJSON() ([]byte, error) + func (dp DiscardPolicy) String() string + type DisconnectEventMsg struct + Client ClientInfo + Reason string + Received DataStats + Sent DataStats + Server ServerInfo + type EventFilterOptions struct + Cluster string + Host string + Name string + type FileConsumerInfo struct + Created time.Time + Name string + type FileStoreConfig struct + BlockSize uint64 + ReadCacheExpire time.Duration + StoreDir string + SyncInterval time.Duration + type FileStreamInfo struct + Created time.Time + type GatewayInterestMode byte + const InterestOnly + const Optimistic + const Transitioning + func (im GatewayInterestMode) String() string + type GatewayOpts struct + Advertise string + AuthTimeout float64 + ConnectRetries int + Gateways []*RemoteGatewayOpts + Host string + Name string + Password string + Port int + RejectUnknown bool + TLSConfig *tls.Config + TLSMap bool + TLSTimeout float64 + Username string + type GatewayOptsVarz struct + Advertise string + AuthTimeout float64 + ConnectRetries int + Gateways []RemoteGatewayOptsVarz + Host string + Name string + Port int + RejectUnknown bool + TLSTimeout float64 + type GatewayStat struct + ID uint64 + Name string + NumInbound int + Received DataStats + Sent DataStats + type Gatewayz struct + Host string + ID string + InboundGateways map[string][]*RemoteGatewayz + Name string + Now time.Time + OutboundGateways map[string]*RemoteGatewayz + Port int + type GatewayzEventOptions struct + type GatewayzOptions struct + AccountName string + Accounts bool + Name string + type Info struct + AuthRequired bool + CID uint64 + ClientConnectURLs []string + ClientIP string + Cluster string + Dynamic bool + Export *SubjectPermission + Gateway string + GatewayCmd byte + GatewayCmdPayload []byte + GatewayNRP bool + GatewayURL string + GatewayURLs []string + GitCommit string + GoVersion string + Headers bool + Host string + ID string + IP string + Import *SubjectPermission + JetStream bool + LNOC bool + LameDuckMode bool + LeafNodeURLs []string + MaxPayload int32 + Name string + Nonce string + Port int + Proto int + TLSAvailable bool + TLSRequired bool + TLSVerify bool + Version string + WSConnectURLs []string + type JSAPIAudit struct + Client ClientAPIAudit + Request string + Response string + Server string + Subject string + type JSApiAccountInfoResponse struct + type JSApiConsumerCreateResponse struct + type JSApiConsumerDeleteResponse struct + Success bool + type JSApiConsumerInfoResponse struct + type JSApiConsumerListResponse struct + Consumers []*ConsumerInfo + type JSApiConsumerNamesResponse struct + Consumers []string + type JSApiConsumersRequest struct + type JSApiMsgDeleteRequest struct + Seq uint64 + type JSApiMsgDeleteResponse struct + Success bool + type JSApiMsgGetRequest struct + Seq uint64 + type JSApiMsgGetResponse struct + Message *StoredMsg + type JSApiStreamCreateResponse struct + type JSApiStreamDeleteResponse struct + Success bool + type JSApiStreamInfoResponse struct + type JSApiStreamListResponse struct + Streams []*StreamInfo + type JSApiStreamNamesRequest struct + type JSApiStreamNamesResponse struct + Streams []string + type JSApiStreamPurgeResponse struct + Purged uint64 + Success bool + type JSApiStreamRestoreResponse struct + DeliverSubject string + type JSApiStreamSnapshotRequest struct + CheckMsgs bool + ChunkSize int + DeliverSubject string + NoConsumers bool + type JSApiStreamSnapshotResponse struct + BlkSize int + NumBlks int + type JSApiStreamTemplateCreateResponse struct + type JSApiStreamTemplateDeleteResponse struct + Success bool + type JSApiStreamTemplateInfoResponse struct + type JSApiStreamTemplateNamesResponse struct + Templates []string + type JSApiStreamTemplatesRequest struct + type JSApiStreamUpdateResponse struct + type JSConsumerAckMetric struct + Consumer string + ConsumerSeq uint64 + Delay int64 + Deliveries uint64 + Stream string + StreamSeq uint64 + type JSConsumerActionAdvisory struct + Action ActionAdvisoryType + Consumer string + Stream string + type JSConsumerDeliveryExceededAdvisory struct + Consumer string + Deliveries uint64 + Stream string + StreamSeq uint64 + type JSConsumerDeliveryTerminatedAdvisory struct + Consumer string + ConsumerSeq uint64 + Deliveries uint64 + Stream string + StreamSeq uint64 + type JSRestoreCompleteAdvisory struct + Bytes int64 + Client *ClientAPIAudit + End time.Time + Start time.Time + Stream string + type JSRestoreCreateAdvisory struct + Client *ClientAPIAudit + Stream string + type JSSnapshotCompleteAdvisory struct + Client *ClientAPIAudit + End time.Time + Start time.Time + Stream string + type JSSnapshotCreateAdvisory struct + BlkSize int + Client *ClientAPIAudit + NumBlks int + Stream string + type JSStreamActionAdvisory struct + Action ActionAdvisoryType + Stream string + Template string + type JWTChanged func(publicKey string) + type JetStreamAccountLimits struct + MaxConsumers int + MaxMemory int64 + MaxStore int64 + MaxStreams int + type JetStreamAccountStats struct + Limits JetStreamAccountLimits + Memory uint64 + Store uint64 + Streams int + type JetStreamConfig struct + MaxMemory int64 + MaxStore int64 + StoreDir string + type JetStreamVarz struct + Accounts int + MaxMemory int64 + MaxStore int64 + StoreDir string + type LatencyClient struct + Account string + CID uint64 + IP string + Lang string + Name string + RTT time.Duration + Server string + Start time.Time + User string + Version string + type LeafInfo struct + Account string + IP string + InBytes int64 + InMsgs int64 + NumSubs uint32 + OutBytes int64 + OutMsgs int64 + Port int + RTT string + Subs []string + type LeafNodeOpts struct + Account string + Advertise string + AuthTimeout float64 + Host string + NoAdvertise bool + Password string + Port int + ReconnectInterval time.Duration + Remotes []*RemoteLeafOpts + TLSConfig *tls.Config + TLSMap bool + TLSTimeout float64 + Username string + Users []*User + type LeafNodeOptsVarz struct + AuthTimeout float64 + Host string + Port int + Remotes []RemoteLeafOptsVarz + TLSTimeout float64 + type Leafz struct + ID string + Leafs []*LeafInfo + Now time.Time + NumLeafs int + type LeafzEventOptions struct + type LeafzOptions struct + Subscriptions bool + type Logger interface + Debugf func(format string, v ...interface{}) + Errorf func(format string, v ...interface{}) + Fatalf func(format string, v ...interface{}) + Noticef func(format string, v ...interface{}) + Tracef func(format string, v ...interface{}) + Warnf func(format string, v ...interface{}) + type MemAccResolver struct + func (*MemAccResolver) Close() + func (*MemAccResolver) IsTrackingUpdate() bool + func (*MemAccResolver) Reload() error + func (*MemAccResolver) Start(*Server) error + func (m *MemAccResolver) Fetch(name string) (string, error) + func (m *MemAccResolver) Store(name, jwt string) error + func (ur *MemAccResolver) IsReadOnly() bool + type NkeyUser struct + Account *Account + Nkey string + Permissions *Permissions + SigningKey string + type Options struct + AccountResolver AccountResolver + AccountResolverTLSConfig *tls.Config + Accounts []*Account + AllowNewAccounts bool + AllowNonTLS bool + AuthTimeout float64 + Authorization string + CheckConfig bool + ClientAdvertise string + Cluster ClusterOpts + ConfigFile string + ConnectErrorReports int + CustomClientAuthentication Authentication + CustomRouterAuthentication Authentication + Debug bool + DisableShortFirstPing bool + Gateway GatewayOpts + HTTPBasePath string + HTTPHost string + HTTPPort int + HTTPSPort int + Host string + JetStream bool + JetStreamMaxMemory int64 + JetStreamMaxStore int64 + LameDuckDuration time.Duration + LameDuckGracePeriod time.Duration + LeafNode LeafNodeOpts + LogFile string + LogSizeLimit int64 + Logtime bool + MaxClosedClients int + MaxConn int + MaxControlLine int32 + MaxPayload int32 + MaxPending int64 + MaxPingsOut int + MaxSubs int + MaxTracedMsgLen int + Nkeys []*NkeyUser + NoAuthUser string + NoHeaderSupport bool + NoLog bool + NoSigs bool + NoSublistCache bool + NoSystemAccount bool + Password string + PidFile string + PingInterval time.Duration + Port int + PortsFileDir string + ProfPort int + ReconnectErrorReports int + RemoteSyslog string + Routes []*url.URL + RoutesStr string + Sctp bool + ServerName string + StoreDir string + Syslog bool + SystemAccount string + TLS bool + TLSCaCert string + TLSCert string + TLSConfig *tls.Config + TLSKey string + TLSMap bool + TLSTimeout float64 + TLSVerify bool + Trace bool + TraceVerbose bool + TrustedKeys []string + TrustedOperators []*jwt.OperatorClaims + Username string + Users []*User + Websocket WebsocketOpts + WriteDeadline time.Duration + var FlagSnapshot *Options + func ConfigureOptions(fs *flag.FlagSet, args []string, printVersion, printHelp, printTLSHelp func()) (*Options, error) + func MergeOptions(fileOpts, flagOpts *Options) *Options + func ProcessConfigFile(configFile string) (*Options, error) + func (o *Options) Clone() *Options + func (o *Options) ProcessConfigFile(configFile string) error + type Permissions struct + Publish *SubjectPermission + Response *ResponsePermission + Subscribe *SubjectPermission + type Ports struct + Cluster []string + Monitoring []string + Nats []string + Profile []string + WebSocket []string + type PubAck struct + Duplicate bool + Seq uint64 + Stream string + type RemoteGatewayOpts struct + Name string + TLSConfig *tls.Config + TLSTimeout float64 + URLs []*url.URL + type RemoteGatewayOptsVarz struct + Name string + TLSTimeout float64 + URLs []string + type RemoteGatewayz struct + Accounts []*AccountGatewayz + Connection *ConnInfo + IsConfigured bool + type RemoteLeafOpts struct + Credentials string + DenyExports []string + DenyImports []string + Hub bool + LocalAccount string + TLS bool + TLSConfig *tls.Config + TLSTimeout float64 + URLs []*url.URL + type RemoteLeafOptsVarz struct + LocalAccount string + TLSTimeout float64 + URLs []string + type ReplayPolicy int + const ReplayInstant + const ReplayOriginal + func (r ReplayPolicy) String() string + func (rp *ReplayPolicy) UnmarshalJSON(data []byte) error + func (rp ReplayPolicy) MarshalJSON() ([]byte, error) + type ResponsePermission struct + Expires time.Duration + MaxMsgs int + type RetentionPolicy int + const InterestPolicy + const LimitsPolicy + const WorkQueuePolicy + func (rp *RetentionPolicy) UnmarshalJSON(data []byte) error + func (rp RetentionPolicy) MarshalJSON() ([]byte, error) + func (rp RetentionPolicy) String() string + type RouteInfo struct + DidSolicit bool + Export *SubjectPermission + IP string + Import *SubjectPermission + InBytes int64 + InMsgs int64 + IsConfigured bool + NumSubs uint32 + OutBytes int64 + OutMsgs int64 + Pending int + Port int + RTT string + RemoteID string + Rid uint64 + Subs []string + SubsDetail []SubDetail + type RoutePermissions struct + Export *SubjectPermission + Import *SubjectPermission + type RouteStat struct + ID uint64 + Name string + Pending int + Received DataStats + Sent DataStats + type RouteType int + const Explicit + const Implicit + type Routez struct + Export *SubjectPermission + ID string + Import *SubjectPermission + Now time.Time + NumRoutes int + Routes []*RouteInfo + type RoutezEventOptions struct + type RoutezOptions struct + Subscriptions bool + SubscriptionsDetail bool + type SequencePair struct + ConsumerSeq uint64 + StreamSeq uint64 + type Server struct + func New(opts *Options) *Server + func NewServer(opts *Options) (*Server, error) + func (s *Server) AcceptLoop(clr chan struct{}) + func (s *Server) AccountResolver() AccountResolver + func (s *Server) Addr() net.Addr + func (s *Server) ClientURL() string + func (s *Server) ClusterAddr() *net.TCPAddr + func (s *Server) ClusterName() string + func (s *Server) ConfigTime() time.Time + func (s *Server) ConfigureLogger() + func (s *Server) Connz(opts *ConnzOptions) (*Connz, error) + func (s *Server) Debugf(format string, v ...interface{}) + func (s *Server) EnableJetStream(config *JetStreamConfig) error + func (s *Server) Errorc(ctx string, e error) + func (s *Server) Errorf(format string, v ...interface{}) + func (s *Server) Errors(scope interface{}, e error) + func (s *Server) Errorsc(scope interface{}, ctx string, e error) + func (s *Server) EventsEnabled() bool + func (s *Server) Fatalf(format string, v ...interface{}) + func (s *Server) GatewayAddr() *net.TCPAddr + func (s *Server) Gatewayz(opts *GatewayzOptions) (*Gatewayz, error) + func (s *Server) GetClient(cid uint64) *client + func (s *Server) GetLeafNode(cid uint64) *client + func (s *Server) GlobalAccount() *Account + func (s *Server) HTTPHandler() http.Handler + func (s *Server) HandleConnz(w http.ResponseWriter, r *http.Request) + func (s *Server) HandleGatewayz(w http.ResponseWriter, r *http.Request) + func (s *Server) HandleLeafz(w http.ResponseWriter, r *http.Request) + func (s *Server) HandleRoot(w http.ResponseWriter, r *http.Request) + func (s *Server) HandleRoutez(w http.ResponseWriter, r *http.Request) + func (s *Server) HandleStacksz(w http.ResponseWriter, r *http.Request) + func (s *Server) HandleSubsz(w http.ResponseWriter, r *http.Request) + func (s *Server) HandleVarz(w http.ResponseWriter, r *http.Request) + func (s *Server) ID() string + func (s *Server) JetStreamConfig() *JetStreamConfig + func (s *Server) JetStreamEnabled() bool + func (s *Server) JetStreamNumAccounts() int + func (s *Server) JetStreamReservedResources() (int64, int64, error) + func (s *Server) Leafz(opts *LeafzOptions) (*Leafz, error) + func (s *Server) LookupAccount(name string) (*Account, error) + func (s *Server) LookupOrRegisterAccount(name string) (account *Account, isNew bool) + func (s *Server) MonitorAddr() *net.TCPAddr + func (s *Server) Name() string + func (s *Server) NewAccountsAllowed() bool + func (s *Server) NonceRequired() bool + func (s *Server) Noticef(format string, v ...interface{}) + func (s *Server) NumActiveAccounts() int32 + func (s *Server) NumClients() int + func (s *Server) NumLeafNodes() int + func (s *Server) NumLoadedAccounts() int + func (s *Server) NumOutboundGateways() int + func (s *Server) NumRemotes() int + func (s *Server) NumRoutes() int + func (s *Server) NumSlowConsumers() int64 + func (s *Server) NumSubscriptions() uint32 + func (s *Server) PortsInfo(maxWait time.Duration) *Ports + func (s *Server) ProfilerAddr() *net.TCPAddr + func (s *Server) ReOpenLogFile() + func (s *Server) ReadyForConnections(dur time.Duration) bool + func (s *Server) RegisterAccount(name string) (*Account, error) + func (s *Server) Reload() error + func (s *Server) Routez(routezOpts *RoutezOptions) (*Routez, error) + func (s *Server) SetAccountResolver(ar AccountResolver) + func (s *Server) SetDefaultSystemAccount() error + func (s *Server) SetLogger(logger Logger, debugFlag, traceFlag bool) + func (s *Server) SetLoggerV2(logger Logger, debugFlag, traceFlag, sysTrace bool) + func (s *Server) SetSystemAccount(accName string) error + func (s *Server) Shutdown() + func (s *Server) Start() + func (s *Server) StartHTTPMonitoring() + func (s *Server) StartHTTPSMonitoring() + func (s *Server) StartMonitoring() error + func (s *Server) StartProfiler() + func (s *Server) StartRouting(clientListenReady chan struct{}) + func (s *Server) Subsz(opts *SubszOptions) (*Subsz, error) + func (s *Server) SystemAccount() *Account + func (s *Server) Tracef(format string, v ...interface{}) + func (s *Server) TrackedRemoteServers() int + func (s *Server) UpdateAccountClaims(a *Account, ac *jwt.AccountClaims) + func (s *Server) Varz(varzOpts *VarzOptions) (*Varz, error) + func (s *Server) WaitForShutdown() + func (s *Server) Warnf(format string, v ...interface{}) + type ServerInfo struct + Cluster string + Host string + ID string + JetStream bool + Name string + Seq uint64 + Time time.Time + Version string + type ServerStats struct + ActiveAccounts int + CPU float64 + Connections int + Cores int + Gateways []*GatewayStat + Mem int64 + NumSubs uint32 + Received DataStats + Routes []*RouteStat + Sent DataStats + SlowConsumers int64 + Start time.Time + TotalConnections uint64 + type ServerStatsMsg struct + Server ServerInfo + Stats ServerStats + type ServiceLatency struct + Error string + RequestHeader http.Header + RequestStart time.Time + Requestor LatencyClient + Responder LatencyClient + ServiceLatency time.Duration + Status int + SystemLatency time.Duration + TotalLatency time.Duration + func (nl *ServiceLatency) NATSTotalTime() time.Duration + type ServiceRespType uint8 + const Chunked + const Singleton + const Streamed + func (rt ServiceRespType) String() string + type SnapshotResult struct + BlkSize int + NumBlks int + Reader io.ReadCloser + type SortOpt string + const ByCid + const ByIdle + const ByInBytes + const ByInMsgs + const ByLast + const ByOutBytes + const ByOutMsgs + const ByPending + const ByReason + const ByStart + const ByStop + const BySubs + const ByUptime + func (s SortOpt) IsValid() bool + type StatszEventOptions struct + type StorageType int + const FileStorage + const MemoryStorage + func (st *StorageType) UnmarshalJSON(data []byte) error + func (st StorageType) MarshalJSON() ([]byte, error) + func (st StorageType) String() string + type StoredMsg struct + Data []byte + Header []byte + Sequence uint64 + Subject string + Time time.Time + type Stream struct + func (mset *Stream) AddConsumer(config *ConsumerConfig) (*Consumer, error) + func (mset *Stream) Config() StreamConfig + func (mset *Stream) Consumers() []*Consumer + func (mset *Stream) Created() time.Time + func (mset *Stream) Delete() error + func (mset *Stream) DeleteConsumer(o *Consumer) error + func (mset *Stream) DeleteMsg(seq uint64) (bool, error) + func (mset *Stream) EraseMsg(seq uint64) (bool, error) + func (mset *Stream) GetMsg(seq uint64) (*StoredMsg, error) + func (mset *Stream) LookupConsumer(name string) *Consumer + func (mset *Stream) Name() string + func (mset *Stream) NumConsumers() int + func (mset *Stream) NumMsgIds() int + func (mset *Stream) Purge() uint64 + func (mset *Stream) RemoveMsg(seq uint64) (bool, error) + func (mset *Stream) Snapshot(deadline time.Duration, checkMsgs, includeConsumers bool) (*SnapshotResult, error) + func (mset *Stream) State() StreamState + func (mset *Stream) Update(config *StreamConfig) error + type StreamConfig struct + Discard DiscardPolicy + Duplicates time.Duration + MaxAge time.Duration + MaxBytes int64 + MaxConsumers int + MaxMsgSize int32 + MaxMsgs int64 + Name string + NoAck bool + Replicas int + Retention RetentionPolicy + Storage StorageType + Subjects []string + Template string + type StreamInfo struct + Config StreamConfig + Created time.Time + State StreamState + type StreamState struct + Bytes uint64 + Consumers int + FirstSeq uint64 + FirstTime time.Time + LastSeq uint64 + LastTime time.Time + Msgs uint64 + type StreamStore interface + ConsumerStore func(name string, cfg *ConsumerConfig) (ConsumerStore, error) + Delete func() error + EraseMsg func(seq uint64) (bool, error) + GetSeqFromTime func(t time.Time) uint64 + LoadMsg func(seq uint64) (subj string, hdr, msg []byte, ts int64, err error) + Purge func() uint64 + RemoveMsg func(seq uint64) (bool, error) + Snapshot func(deadline time.Duration, includeConsumers, checkMsgs bool) (*SnapshotResult, error) + State func() StreamState + Stop func() error + StorageBytesUpdate func(func(int64)) + StoreMsg func(subj string, hdr, msg []byte) (uint64, int64, error) + UpdateConfig func(cfg *StreamConfig) error + type StreamTemplate struct + func (t *StreamTemplate) Delete() error + type StreamTemplateConfig struct + Config *StreamConfig + MaxStreams uint32 + Name string + type StreamTemplateInfo struct + Config *StreamTemplateConfig + Streams []string + type SubDetail struct + Account string + Cid uint64 + Max int64 + Msgs int64 + Queue string + Sid string + Subject string + type SubjectPermission struct + Allow []string + Deny []string + type Sublist struct + func NewSublist(enableCache bool) *Sublist + func NewSublistNoCache() *Sublist + func NewSublistWithCache() *Sublist + func (s *Sublist) All(subs *[]*subscription) + func (s *Sublist) CacheCount() int + func (s *Sublist) CacheEnabled() bool + func (s *Sublist) ClearNotification(subject string, notify chan<- bool) bool + func (s *Sublist) Count() uint32 + func (s *Sublist) Insert(sub *subscription) error + func (s *Sublist) Match(subject string) *SublistResult + func (s *Sublist) RegisterNotification(subject string, notify chan<- bool) error + func (s *Sublist) Remove(sub *subscription) error + func (s *Sublist) RemoveBatch(subs []*subscription) error + func (s *Sublist) Stats() *SublistStats + func (s *Sublist) UpdateRemoteQSub(sub *subscription) + type SublistResult struct + type SublistStats struct + AvgFanout float64 + CacheHitRate float64 + MaxFanout uint32 + NumCache uint32 + NumInserts uint64 + NumMatches uint64 + NumRemoves uint64 + NumSubs uint32 + type Subsz struct + ID string + Limit int + Now time.Time + Offset int + Subs []SubDetail + Total int + type SubszEventOptions struct + type SubszOptions struct + Account string + Limit int + Offset int + Subscriptions bool + Test string + type TLSConfigOpts struct + CaFile string + CertFile string + Ciphers []uint16 + CurvePreferences []tls.CurveID + Insecure bool + KeyFile string + Map bool + Timeout float64 + Verify bool + type TemplateStore interface + Delete func(*StreamTemplate) error + Store func(*StreamTemplate) error + type TypedEvent struct + ID string + Time time.Time + Type string + type URLAccResolver struct + func NewURLAccResolver(url string) (*URLAccResolver, error) + func (*URLAccResolver) Close() + func (*URLAccResolver) IsReadOnly() bool + func (*URLAccResolver) IsTrackingUpdate() bool + func (*URLAccResolver) Reload() error + func (*URLAccResolver) Start(*Server) error + func (*URLAccResolver) Store(_, _ string) error + func (ur *URLAccResolver) Fetch(name string) (string, error) + type User struct + Account *Account + Password string + Permissions *Permissions + Username string + type Varz struct + AuthRequired bool + AuthTimeout float64 + CPU float64 + ClientConnectURLs []string + Cluster ClusterOptsVarz + ConfigLoadTime time.Time + Connections int + Cores int + Gateway GatewayOptsVarz + GitCommit string + GoVersion string + HTTPBasePath string + HTTPHost string + HTTPPort int + HTTPReqStats map[string]uint64 + HTTPSPort int + Host string + ID string + IP string + InBytes int64 + InMsgs int64 + JetStream JetStreamVarz + LeafNode LeafNodeOptsVarz + Leafs int + MaxConn int + MaxControlLine int32 + MaxPayload int + MaxPending int64 + MaxPingsOut int + MaxProcs int + MaxSubs int + Mem int64 + Name string + Now time.Time + OutBytes int64 + OutMsgs int64 + PingInterval time.Duration + Port int + Proto int + Remotes int + Routes int + SlowConsumers int64 + Start time.Time + Subscriptions uint32 + TLSRequired bool + TLSTimeout float64 + TLSVerify bool + TotalConnections uint64 + Uptime string + Version string + WSConnectURLs []string + WriteDeadline time.Duration + type VarzEventOptions struct + type VarzOptions struct + type WebsocketOpts struct + Advertise string + AllowedOrigins []string + AuthTimeout float64 + Compression bool + HandshakeTimeout time.Duration + Host string + JWTCookie string + Nkeys []*NkeyUser + NoAuthUser string + NoTLS bool + Password string + Port int + SameOrigin bool + TLSConfig *tls.Config + TLSMap bool + Token string + Username string + Users []*User