Documentation ¶
Overview ¶
Taken from RakutenTech nozzle Thanks to them
Index ¶
- Constants
- type Server
- type Stats
- func (s *Stats) Dec(statsType StatsType)
- func (s *Stats) Inc(statsType StatsType)
- func (s *Stats) Json() ([]byte, error)
- func (v Stats) MarshalEasyJSON(w *jwriter.Writer)
- func (v Stats) MarshalJSON() ([]byte, error)
- func (s *Stats) PerSec()
- func (v *Stats) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *Stats) UnmarshalJSON(data []byte) error
- type StatsType
Constants ¶
View Source
const ( // DefaultPort is default port to listen DefaultPort = "8080" // EnvPort is environmental variable to change port to listen EnvPort = "PORT" )
View Source
const (
EnvCFInstanceIndex = "CF_INSTANCE_INDEX"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
Server is used for various debugging. It opens runtime stats, pprof and appliclation stats.
type Stats ¶
type Stats struct { Consume uint64 `json:"consume"` ConsumePerSec uint64 `json:"consume_per_sec"` ConsumeFail uint64 `json:"consume_fail"` ConsumeHttpStartStop uint64 `json:"consume_http_start_stop"` ConsumeValueMetric uint64 `json:"consume_value_metric"` ConsumeCounterEvent uint64 `json:"consume_counter_event"` ConsumeLogMessage uint64 `json:"consume_log_message"` ConsumeError uint64 `json:"consume_error"` ConsumeContainerMetric uint64 `json:"consume_container_metric"` ConsumeUnknown uint64 `json:"consume_unknown"` Ignored uint64 `json:"ignored"` Forwarded uint64 `json:"forwarded"` Publish uint64 `json:"publish"` PublishPerSec uint64 `json:"publish_per_sec"` // This is same as the number of dropped message PublishFail uint64 `json:"publish_fail"` SlowConsumerAlert uint64 `json:"slow_consumer_alert"` // SubInputBuffer is used to count number of current // buffer on subInput. SubInputBuffer int64 `json:"subinupt_buffer"` // InstanceID is ID for nozzle instance. // This is used to identify stats from different instances. // By default, it's defaultInstanceID InstanceID int `json:"instance_id"` }
Stats stores various stats infomation
func (Stats) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Stats) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Stats) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Stats) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type StatsType ¶
type StatsType int
const ( Consume StatsType = iota // messages received ConsumeFail // messages failed to be consumed ConsumeHttpStartStop // HttpStartStop messages received ConsumeValueMetric // ValueMetric messages received ConsumeCounterEvent // CounterEvent messages received ConsumeLogMessage // LogMessage messages received ConsumeError // Error messages received ConsumeContainerMetric // ContainerMetric messages received ConsumeUnknown // unknown type messages received Ignored // messages dropped because of no forwarding rule Forwarded // messages Publish // messages PublishFail // messages SlowConsumerAlert // slow consumer alerts emitted by noaa? SubInputBuffer // messages in buffer )
Click to show internal directories.
Click to hide internal directories.