Documentation
¶
Index ¶
- Constants
- func SetAgentsByNKey(ctx context.Context, byName AgentIndex) context.Context
- func SetAgentsByName(ctx context.Context, byName AgentIndex) context.Context
- func UnmarshalLogFmtRecord(ctx context.Context, msg *nats.Msg, record *LogFmtRecord) (err error)
- func UnmarshalTerminalRecord(ctx context.Context, msg *nats.Msg, record *TerminalRecord) (err error)
- type AgentIndex
- type LogFmtRecord
- type Record
- type RecordReader
- type RecordType
- type TerminalRecord
Constants ¶
View Source
const ( ErrUnexpectedFormat = errors.ConstError("unexpected format") HeaderFormat = "Fmt" HeaderLogFmt = "LogFmt" HeaderTerm = "Term" )
View Source
const ( RecordTerm = iota RecordLogFmt = 1 )
Variables ¶
This section is empty.
Functions ¶
func SetAgentsByNKey ¶
func SetAgentsByNKey(ctx context.Context, byName AgentIndex) context.Context
func SetAgentsByName ¶
func SetAgentsByName(ctx context.Context, byName AgentIndex) context.Context
func UnmarshalLogFmtRecord ¶
func UnmarshalTerminalRecord ¶
Types ¶
type AgentIndex ¶
func GetAgentsByNKey ¶
func GetAgentsByNKey(ctx context.Context) AgentIndex
func GetAgentsByName ¶
func GetAgentsByName(ctx context.Context) AgentIndex
type LogFmtRecord ¶
type LogFmtRecord struct {
Level log.Level
Text string
Meta map[string]string
Timestamp time.Time
// contains filtered or unexported fields
}
func (*LogFmtRecord) Msg ¶
func (r *LogFmtRecord) Msg() *nats.Msg
func (*LogFmtRecord) Type ¶
func (r *LogFmtRecord) Type() RecordType
type RecordReader ¶
type RecordReader struct {
Sub *nats.Subscription
Context context.Context
}
func (*RecordReader) Read ¶
func (r *RecordReader) Read() (record Record, err error)
type RecordType ¶
type RecordType int
type TerminalRecord ¶
type TerminalRecord struct {
// contains filtered or unexported fields
}
func (*TerminalRecord) Msg ¶
func (t *TerminalRecord) Msg() *nats.Msg
func (*TerminalRecord) Type ¶
func (t *TerminalRecord) Type() RecordType
Click to show internal directories.
Click to hide internal directories.