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) 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) 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) 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) SetMonitoring ¶
func (m *Mock) SetMonitoring(mon mondriver.Monitoring)
SetMonitoring sets the monitoring backend for auto-metric generation.