Documentation ¶
Index ¶
- Variables
- func NewInstanceSettings() datasource.InstanceFactoryFunc
- type AWSError
- 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 LimitExceededException = "LimitExceededException"
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("Grafana/%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("Grafana/%s", setting.BuildVersion)) }) return client }
NewCWLogsClient is a CloudWatch logs client factory.
Stubbable by tests.
Functions ¶
func NewInstanceSettings ¶
func NewInstanceSettings() datasource.InstanceFactoryFunc
Types ¶
type CloudWatchService ¶
type CloudWatchService struct { LogsService *LogsService Cfg *setting.Cfg Executor *cloudWatchExecutor }
func ProvideService ¶
func ProvideService(cfg *setting.Cfg, logsService *LogsService, registrar plugins.CoreBackendRegistrar) (*CloudWatchService, error)
type FakeCWClient ¶
type FakeCWClient struct { cloudwatchiface.CloudWatchAPI cloudwatch.GetMetricDataOutput Metrics []*cloudwatch.Metric MetricsPerPage int }
func (FakeCWClient) GetMetricDataWithContext ¶
func (c FakeCWClient) GetMetricDataWithContext(aws.Context, *cloudwatch.GetMetricDataInput, ...request.Option) (*cloudwatch.GetMetricDataOutput, error)
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 ProvideLogsService ¶
func ProvideLogsService() *LogsService
func (*LogsService) AddResponseChannel ¶
func (s *LogsService) AddResponseChannel(name string, channel chan *backend.QueryDataResponse) error
func (*LogsService) DeleteResponseChannel ¶
func (s *LogsService) DeleteResponseChannel(name string)
func (*LogsService) GetResponseChannel ¶
func (s *LogsService) GetResponseChannel(name string) (chan *backend.QueryDataResponse, error)
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_row_response.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.