Documentation ¶
Index ¶
- type Agent
- type Writer
- func (w *Writer) Close() error
- func (w *Writer) CloseContext(ctx context.Context) error
- func (w *Writer) Flush() error
- func (w *Writer) FlushContext(ctx context.Context) error
- func (w *Writer) LastFlushedTime() time.Time
- func (w *Writer) Write(p []byte) (int, error)
- func (w *Writer) WriteContext(ctx context.Context, p []byte) (int, error)
- func (w *Writer) WriteEvent(now time.Time, message string) (int, error)
- func (w *Writer) WriteEventContext(ctx context.Context, now time.Time, message string) (int, error)
- func (w *Writer) WriteString(s string) (int, error)
- func (w *Writer) WriteStringContext(ctx context.Context, s string) (int, error)
- func (w *Writer) WriteStringWithTime(now time.Time, s string) (int, error)
- func (w *Writer) WriteStringWithTimeContext(ctx context.Context, now time.Time, s string) (int, error)
- func (w *Writer) WriteWithTime(now time.Time, p []byte) (int, error)
- func (w *Writer) WriteWithTimeContext(ctx context.Context, now time.Time, p []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct { *Writer // Files are target file names for tailing. // If the length of Files is zero, the standard input is used. Files []string // FlushInterval specifies the interval // to flush to the logs. // If zero, no periodic flushing is done. FlushInterval time.Duration // FlushTimeout specifies the timeout // to flush to the logs. // If zero, flushing is never timeout. FlushTimeout time.Duration // contains filtered or unexported fields }
Agent is a CloudWatch Logs Agent Lite.
type Writer ¶
type Writer struct { Config aws.Config LogGroupName string LogStreamName string LogRetentionDays int // contains filtered or unexported fields }
Writer is a wrapper CloudWatch Logs that provides io.Writer interface.
func (*Writer) CloseContext ¶ added in v0.0.9
CloseContexts closes the Writer.
func (*Writer) FlushContext ¶ added in v0.0.9
FlushContext flushes the logs to the AWS CloudWatch Logs.
func (*Writer) LastFlushedTime ¶ added in v0.0.11
LastFlushedTime returns the timestamp of the event most recently putted.
func (*Writer) WriteContext ¶ added in v0.0.9
WriteContext is same as Write, and it supports the context.
func (*Writer) WriteEvent ¶
WriteEvent writes an log event.
func (*Writer) WriteEventContext ¶ added in v0.0.9
WriteEventContext writes log events. Long message might be separated into multiple events.
func (*Writer) WriteString ¶
WriteString writes a string.
func (*Writer) WriteStringContext ¶ added in v0.0.9
WriteStringContext writes a string.
func (*Writer) WriteStringWithTime ¶
WriteStringWithTime writes data with timestamp.
func (*Writer) WriteStringWithTimeContext ¶ added in v0.0.9
func (w *Writer) WriteStringWithTimeContext(ctx context.Context, now time.Time, s string) (int, error)
WriteStringWithTimeContext writes data with timestamp.
func (*Writer) WriteWithTime ¶
WriteWithTime writes data with timestamp.