Documentation
¶
Index ¶
- Constants
- Variables
- type FetchOpt
- type FetchOpts
- type HealthStatus
- type Healthz
- type HealthzResp
- type JSZResp
- type SysClient
- func (s *SysClient) Fetch(subject string, data []byte, opts ...FetchOpt) ([]*nats.Msg, error)
- func (s *SysClient) FindServers(stdin bool, expected int, timeout time.Duration, readTimeout time.Duration, ...) ([]JSZResp, error)
- func (s *SysClient) Healthz(id string, opts server.HealthzOptions) (*HealthzResp, error)
- func (s *SysClient) JszPing(opts server.JszEventOptions, fopts ...FetchOpt) ([]JSZResp, error)
Constants ¶
View Source
const (
DefaultRequestTimeout = 60 * time.Second
)
Variables ¶
View Source
var ( ErrValidation = errors.New("validation error") ErrInvalidServerID = errors.New("server with given ID does not exist") )
Functions ¶
This section is empty.
Types ¶
type HealthStatus ¶
type HealthStatus int
const ( StatusOK HealthStatus = iota StatusError )
func (HealthStatus) MarshalJSON ¶
func (hs HealthStatus) MarshalJSON() ([]byte, error)
func (HealthStatus) String ¶
func (hs HealthStatus) String() string
func (*HealthStatus) UnmarshalJSON ¶
func (hs *HealthStatus) UnmarshalJSON(data []byte) error
type Healthz ¶
type Healthz struct {
Status HealthStatus `json:"status"`
Error string `json:"error,omitempty"`
}
type HealthzResp ¶
type HealthzResp struct {
Server server.ServerInfo `json:"server"`
Healthz Healthz `json:"data"`
}
type JSZResp ¶
type JSZResp struct {
Server server.ServerInfo `json:"server"`
JSInfo server.JSInfo `json:"data"`
}
type SysClient ¶
type SysClient struct {
// contains filtered or unexported fields
}
SysClient can be used to request monitoring data from the server. This is used by the stream-check and consumer-check commands
func (*SysClient) FindServers ¶
func (*SysClient) Healthz ¶
func (s *SysClient) Healthz(id string, opts server.HealthzOptions) (*HealthzResp, error)
Click to show internal directories.
Click to hide internal directories.