Documentation ¶
Index ¶
- Variables
- type ByTime
- type CloudWatchService
- type FakeCWClient
- type FakeCWLogsClient
- func (m FakeCWLogsClient) DescribeLogGroupsWithContext(ctx context.Context, input *cloudwatchlogs.DescribeLogGroupsInput, ...) (*cloudwatchlogs.DescribeLogGroupsOutput, error)
- func (m FakeCWLogsClient) GetLogGroupFieldsWithContext(ctx context.Context, input *cloudwatchlogs.GetLogGroupFieldsInput, ...) (*cloudwatchlogs.GetLogGroupFieldsOutput, error)
- func (m FakeCWLogsClient) GetQueryResultsWithContext(ctx context.Context, input *cloudwatchlogs.GetQueryResultsInput, ...) (*cloudwatchlogs.GetQueryResultsOutput, error)
- func (m FakeCWLogsClient) StartQueryWithContext(ctx context.Context, input *cloudwatchlogs.StartQueryInput, ...) (*cloudwatchlogs.StartQueryOutput, error)
- func (m FakeCWLogsClient) StopQueryWithContext(ctx context.Context, input *cloudwatchlogs.StopQueryInput, ...) (*cloudwatchlogs.StopQueryOutput, error)
- type LogQueryRunnerSupplier
- type LogsService
- type SessionCache
Constants ¶
This section is empty.
Variables ¶
View Source
var NewCWClient = func(sess *session.Session) cloudwatchiface.CloudWatchAPI { client := cloudwatch.New(sess) client.Handlers.Send.PushFront(func(r *request.Request) { r.HTTPRequest.Header.Set("User-Agent", fmt.Sprintf("Grafarg/%s", setting.BuildVersion)) }) return client }
NewCWClient is a CloudWatch client factory.
Stubbable by tests.
View Source
var NewCWLogsClient = func(sess *session.Session) cloudwatchlogsiface.CloudWatchLogsAPI { client := cloudwatchlogs.New(sess) client.Handlers.Send.PushFront(func(r *request.Request) { r.HTTPRequest.Header.Set("User-Agent", fmt.Sprintf("Grafarg/%s", setting.BuildVersion)) }) return client }
NewCWLogsClient is a CloudWatch logs client factory.
Stubbable by tests.
Functions ¶
This section is empty.
Types ¶
type CloudWatchService ¶
type CloudWatchService struct { LogsService *LogsService `inject:""` Cfg *setting.Cfg `inject:""` // contains filtered or unexported fields }
func (*CloudWatchService) Init ¶
func (s *CloudWatchService) Init() error
func (*CloudWatchService) NewExecutor ¶
func (s *CloudWatchService) NewExecutor(*models.DataSource) (*cloudWatchExecutor, error)
type FakeCWClient ¶
type FakeCWClient struct { cloudwatchiface.CloudWatchAPI Metrics []*cloudwatch.Metric MetricsPerPage int }
func (FakeCWClient) ListMetricsPages ¶
func (c FakeCWClient) ListMetricsPages(input *cloudwatch.ListMetricsInput, fn func(*cloudwatch.ListMetricsOutput, bool) bool) error
type FakeCWLogsClient ¶
type FakeCWLogsClient struct { cloudwatchlogsiface.CloudWatchLogsAPI // contains filtered or unexported fields }
func (FakeCWLogsClient) DescribeLogGroupsWithContext ¶
func (m FakeCWLogsClient) DescribeLogGroupsWithContext(ctx context.Context, input *cloudwatchlogs.DescribeLogGroupsInput, option ...request.Option) (*cloudwatchlogs.DescribeLogGroupsOutput, error)
func (FakeCWLogsClient) GetLogGroupFieldsWithContext ¶
func (m FakeCWLogsClient) GetLogGroupFieldsWithContext(ctx context.Context, input *cloudwatchlogs.GetLogGroupFieldsInput, option ...request.Option) (*cloudwatchlogs.GetLogGroupFieldsOutput, error)
func (FakeCWLogsClient) GetQueryResultsWithContext ¶
func (m FakeCWLogsClient) GetQueryResultsWithContext(ctx context.Context, input *cloudwatchlogs.GetQueryResultsInput, option ...request.Option) (*cloudwatchlogs.GetQueryResultsOutput, error)
func (FakeCWLogsClient) StartQueryWithContext ¶
func (m FakeCWLogsClient) StartQueryWithContext(ctx context.Context, input *cloudwatchlogs.StartQueryInput, option ...request.Option) (*cloudwatchlogs.StartQueryOutput, error)
func (FakeCWLogsClient) StopQueryWithContext ¶
func (m FakeCWLogsClient) StopQueryWithContext(ctx context.Context, input *cloudwatchlogs.StopQueryInput, option ...request.Option) (*cloudwatchlogs.StopQueryOutput, error)
type LogQueryRunnerSupplier ¶
type LogQueryRunnerSupplier struct { Publisher models.ChannelPublisher Service *LogsService }
func (*LogQueryRunnerSupplier) GetHandlerForPath ¶
func (s *LogQueryRunnerSupplier) GetHandlerForPath(path string) (models.ChannelHandler, error)
GetHandlerForPath gets the channel handler for a certain path.
type LogsService ¶
type LogsService struct {
// contains filtered or unexported fields
}
LogsService provides methods for querying CloudWatch Logs.
func (*LogsService) AddResponseChannel ¶
func (s *LogsService) AddResponseChannel(name string, channel chan *tsdb.Response) error
func (*LogsService) DeleteResponseChannel ¶
func (s *LogsService) DeleteResponseChannel(name string)
func (*LogsService) GetResponseChannel ¶
func (s *LogsService) GetResponseChannel(name string) (chan *tsdb.Response, error)
func (*LogsService) Init ¶
func (s *LogsService) Init() error
Init is called by the DI framework to initialize the instance.
type SessionCache ¶
Source Files ¶
- annotation_query.go
- cloudwatch.go
- cloudwatch_query.go
- get_metric_data_executor.go
- live.go
- log_actions.go
- log_query.go
- logs.go
- metric_data_input_builder.go
- metric_data_query_builder.go
- metric_find_query.go
- query_transformer.go
- request_parser.go
- response_parser.go
- sort_frame.go
- test_utils.go
- time_series_query.go
- types.go
Click to show internal directories.
Click to hide internal directories.