Documentation
¶
Overview ¶
Package cloudlogging provides an in-memory mock implementation of GCP Cloud Logging.
Index ¶
- type Mock
- func (m *Mock) CreateLogGroup(_ context.Context, cfg driver.LogGroupConfig) (*driver.LogGroupInfo, error)
- func (m *Mock) CreateLogStream(_ context.Context, logGroup, streamName string) (*driver.LogStreamInfo, error)
- func (m *Mock) DeleteLogGroup(_ context.Context, name string) error
- func (m *Mock) DeleteLogStream(_ context.Context, logGroup, streamName string) error
- func (m *Mock) DeleteMetricFilter(_ context.Context, logGroup, filterName string) error
- func (m *Mock) DescribeMetricFilters(_ context.Context, logGroup string) ([]driver.MetricFilterInfo, error)
- func (m *Mock) FilterLogEvents(_ context.Context, input *driver.FilterLogEventsInput) ([]driver.FilteredLogEvent, error)
- func (m *Mock) GetLogEvents(_ context.Context, input *driver.LogQueryInput) ([]driver.LogEvent, error)
- func (m *Mock) GetLogGroup(_ context.Context, name string) (*driver.LogGroupInfo, error)
- func (m *Mock) ListLogGroups(_ context.Context) ([]driver.LogGroupInfo, error)
- func (m *Mock) ListLogStreams(_ context.Context, logGroup string) ([]driver.LogStreamInfo, error)
- func (m *Mock) PutLogEvents(ctx context.Context, groupName, streamName string, events []driver.LogEvent) error
- func (m *Mock) PutMetricFilter(_ context.Context, cfg *driver.MetricFilterConfig) error
- func (m *Mock) SetMonitoring(mon mondriver.Monitoring)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mock ¶
type Mock struct {
// contains filtered or unexported fields
}
Mock is an in-memory mock implementation of GCP Cloud Logging.
func (*Mock) CreateLogGroup ¶
func (m *Mock) CreateLogGroup(_ context.Context, cfg driver.LogGroupConfig) (*driver.LogGroupInfo, error)
CreateLogGroup creates a new Cloud Logging log bucket.
func (*Mock) CreateLogStream ¶
func (m *Mock) CreateLogStream(_ context.Context, logGroup, streamName string) (*driver.LogStreamInfo, error)
CreateLogStream creates a new log stream in a log bucket.
func (*Mock) DeleteLogGroup ¶
DeleteLogGroup deletes a Cloud Logging log bucket by name.
func (*Mock) DeleteLogStream ¶
DeleteLogStream deletes a log stream from a log bucket.
func (*Mock) DeleteMetricFilter ¶ added in v1.3.2
DeleteMetricFilter deletes a metric filter from a log group.
func (*Mock) DescribeMetricFilters ¶ added in v1.3.2
func (m *Mock) DescribeMetricFilters( _ context.Context, logGroup string, ) ([]driver.MetricFilterInfo, error)
DescribeMetricFilters lists all metric filters for a log group.
func (*Mock) FilterLogEvents ¶ added in v1.3.2
func (m *Mock) FilterLogEvents( _ context.Context, input *driver.FilterLogEventsInput, ) ([]driver.FilteredLogEvent, error)
FilterLogEvents filters log events across streams using a pattern.
func (*Mock) GetLogEvents ¶
func (m *Mock) GetLogEvents(_ context.Context, input *driver.LogQueryInput) ([]driver.LogEvent, error)
GetLogEvents retrieves log events matching the query.
func (*Mock) GetLogGroup ¶
GetLogGroup retrieves information about a Cloud Logging log bucket.
func (*Mock) ListLogGroups ¶
ListLogGroups lists all Cloud Logging log buckets.
func (*Mock) ListLogStreams ¶
ListLogStreams lists all log streams in a log bucket.
func (*Mock) PutLogEvents ¶
func (m *Mock) PutLogEvents(ctx context.Context, groupName, streamName string, events []driver.LogEvent) error
PutLogEvents writes log events to a stream.
func (*Mock) PutMetricFilter ¶ added in v1.3.2
PutMetricFilter creates or updates a metric filter for a log group.
func (*Mock) SetMonitoring ¶
func (m *Mock) SetMonitoring(mon mondriver.Monitoring)
SetMonitoring sets the monitoring backend for auto-metric generation.