Documentation ¶
Index ¶
- Constants
- func CheckForErrorResponse(response []byte, statusCode int) error
- func CloseOffThreadSender()
- func CreateOffThreadSender() bool
- func ExtractNextTokenFromError(e *ErrorResult) string
- func GetOffThreadSenderCount() int
- func MultiKeyValueDimensionMetrics(name []string, value []float64, unit []string, namespace string, ...) error
- func MultiKeyValueMetrics(name []string, value []float64, unit []string, namespace string, ...) error
- func NewTimedEvent(name, namespace string, onThisThread bool) timedEvent
- func SetMaxOffThreadSenders(amt int)
- func SimpleKeyValueMetric(name string, value float64, unit string, namespace string, ...) error
- type CreateLogGroupRequest
- type CreateLogGroupResponse
- type CreateLogStreamRequest
- type CreateLogStreamResponse
- type DescribeLogGroupsRequest
- func (req DescribeLogGroupsRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}
- func (req DescribeLogGroupsRequest) Request() (*DescribeLogGroupsResponse, error)
- func (req *DescribeLogGroupsRequest) SetLimit(limit int)
- func (req *DescribeLogGroupsRequest) VerifyInput() error
- type DescribeLogGroupsResponse
- type DescribeLogStreamsRequest
- func (req DescribeLogStreamsRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}
- func (req DescribeLogStreamsRequest) Request() (*DescribeLogStreamsResponse, error)
- func (req *DescribeLogStreamsRequest) SetLimit(limit int)
- func (req *DescribeLogStreamsRequest) VerifyInput() error
- type DescribeLogStreamsResponse
- type ErrorResult
- type GetLogEventsRequest
- func (req GetLogEventsRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}
- func (req GetLogEventsRequest) Request() (*GetLogEventsResponse, error)
- func (req *GetLogEventsRequest) SetLimit(limit int)
- func (req *GetLogEventsRequest) SetTimeRange(start time.Time, end time.Time)
- func (req *GetLogEventsRequest) VerifyInput() error
- type GetLogEventsResponse
- type GetMetricResultDatapoint
- type GetMetricStatisticsRequest
- type GetMetricStatisticsResponse
- type GetMetricStatisticsResult
- type ListMetricsRequest
- type ListMetricsResponse
- type ListMetricsResult
- type LogEvents
- type LogEventsResponse
- type LogGroup
- type LogStream
- type MetricDatum
- type MetricDimensions
- type MetricInfo
- type PutLogEventsRequest
- func (req *PutLogEventsRequest) AddEvent(message string, at time.Time)
- func (req PutLogEventsRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}
- func (req PutLogEventsRequest) Request() (*PutLogEventsResponse, error)
- func (req PutLogEventsRequest) RequestSplit() (*PutLogEventsResponse, error)
- func (req *PutLogEventsRequest) VerifyInput() error
- type PutLogEventsResponse
- type PutMetricRequest
- type PutMetricResponse
- type PutRetentionPolicyRequest
- type PutRetentionPolicyResponse
- type StatisticSet
Constants ¶
View Source
const ( STATISTIC_Average = "Average" STATISTIC_Sum = "Sum" STATISTIC_SampleCount = "SampleCount" STATISTIC_Maximum = "Maximum" STATISTIC_Minimum = "Minimum" )
View Source
const ( UNIT_SECONDS = "Seconds" UNIT_MICROSECONDS = "Microseconds" UNIT_MILLISECONDS = "Milliseconds" UNIT_BYTES = "Bytes" UNIT_KILOBYTES = "Kilobytes" UNIT_MEGABYTES = "Megabytes" UNIT_GIGABYTES = "Gigabytes" UNIT_TERABYTES = "Terabytes" UNIT_BITS = "Bits" UNIT_KILOBITS = "Kilobits" UNIT_MEGABITS = "Megabits" UNIT_GIGABITS = "Gigabits" UNIT_TERABITS = "Terabits" UNIT_PERCENT = "Percent" UNIT_COUNT = "Count" UNIT_BYTES_PER_SECOND = "Bytes/Second" UNIT_KILOBYTES_PER_SECOND = "Kilobytes/Second" UNIT_MEGABYTES_PER_SECOND = "Megabytes/Second" UNIT_GIGABYTES_PER_SECOND = "Gigabytes/Second" UNIT_TERABYTES_PER_SECOND = "Terabytes/Second" UNIT_BITS_PER_SECOND = "Bits/Second" UNIT_KILOBITS_PER_SECOND = "Kilobits/Second" UNIT_MEGABITS_PER_SECOND = "Megabits/Second" UNIT_GIGABITS_PER_SECOND = "Gigabits/Second" UNIT_TERABITS_PER_SECOND = "Terabits/Second" UNIT_COUNT_PER_SECOND = "Count/Second" UNIT_NONE = "None" )
View Source
const ( ResourceAlreadyExistsExceptionType = "ResourceAlreadyExistsException" InvalidSequenceTokenExceptionType = "InvalidSequenceTokenException" DataAlreadyAcceptedExceptionType = "DataAlreadyAcceptedException" )
Variables ¶
This section is empty.
Functions ¶
func CheckForErrorResponse ¶
func CloseOffThreadSender ¶
func CloseOffThreadSender()
func CreateOffThreadSender ¶
func CreateOffThreadSender() bool
* Creates a worker to send metrics.
- return false if we already have the max number of proces
func ExtractNextTokenFromError ¶
func ExtractNextTokenFromError(e *ErrorResult) string
func GetOffThreadSenderCount ¶
func GetOffThreadSenderCount() int
func MultiKeyValueMetrics ¶
func NewTimedEvent ¶
func SetMaxOffThreadSenders ¶
func SetMaxOffThreadSenders(amt int)
func SimpleKeyValueMetric ¶
func SimpleKeyValueMetric(name string, value float64, unit string, namespace string, sendOnThisThread bool) error
*
- Creates a single metric and posts it.
- Sets the metric name, value, unit and namespace for the given parameters.
- Also sets timestamp to time.Now()
- if sendOnThisThread is set to true then this request will block to send it.
- Otherwise it will be pushed into a channel to be sent by a worker created
- in CreateOffThreadSender().
Types ¶
type CreateLogGroupRequest ¶
type CreateLogGroupRequest struct { awsgo.RequestBuilder LogGroupName string `json:"logGroupName"` }
func NewCreateLogGroupRequest ¶
func NewCreateLogGroupRequest() *CreateLogGroupRequest
func (CreateLogGroupRequest) DeMarshalResponse ¶
func (req CreateLogGroupRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}
func (CreateLogGroupRequest) Request ¶
func (req CreateLogGroupRequest) Request() (*CreateLogGroupResponse, error)
func (*CreateLogGroupRequest) VerifyInput ¶
func (req *CreateLogGroupRequest) VerifyInput() error
type CreateLogGroupResponse ¶
type CreateLogGroupResponse struct { }
type CreateLogStreamRequest ¶
type CreateLogStreamRequest struct { awsgo.RequestBuilder LogGroupName string `json:"logGroupName"` LogStreamName string `json:"logStreamName"` }
func NewCreateLogStreamRequest ¶
func NewCreateLogStreamRequest() *CreateLogStreamRequest
func (CreateLogStreamRequest) DeMarshalResponse ¶
func (req CreateLogStreamRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}
func (CreateLogStreamRequest) Request ¶
func (req CreateLogStreamRequest) Request() (*CreateLogStreamResponse, error)
func (*CreateLogStreamRequest) VerifyInput ¶
func (req *CreateLogStreamRequest) VerifyInput() error
type CreateLogStreamResponse ¶
type CreateLogStreamResponse struct { }
type DescribeLogGroupsRequest ¶
type DescribeLogGroupsRequest struct { awsgo.RequestBuilder LogGroupNamePrefix string `json:"logGroupNamePrefix,omitempty"` Limit *int `json:"limit,omitempty"` NextToken string `json:"nextToken,omitempty"` }
func NewDescribeLogGroupsRequest ¶
func NewDescribeLogGroupsRequest() *DescribeLogGroupsRequest
func (DescribeLogGroupsRequest) DeMarshalResponse ¶
func (req DescribeLogGroupsRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}
func (DescribeLogGroupsRequest) Request ¶
func (req DescribeLogGroupsRequest) Request() (*DescribeLogGroupsResponse, error)
func (*DescribeLogGroupsRequest) SetLimit ¶
func (req *DescribeLogGroupsRequest) SetLimit(limit int)
func (*DescribeLogGroupsRequest) VerifyInput ¶
func (req *DescribeLogGroupsRequest) VerifyInput() error
type DescribeLogStreamsRequest ¶
type DescribeLogStreamsRequest struct { awsgo.RequestBuilder LogGroupName string `json:"logGroupName"` LogStreamNamePrefix string `json:"logStreamNamePrefix,omitempty"` Limit *int `json:"limit,omitempty"` NextToken string `json:"nextToken,omitempty"` }
func NewDescribeLogStreamsRequest ¶
func NewDescribeLogStreamsRequest() *DescribeLogStreamsRequest
func (DescribeLogStreamsRequest) DeMarshalResponse ¶
func (req DescribeLogStreamsRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}
func (DescribeLogStreamsRequest) Request ¶
func (req DescribeLogStreamsRequest) Request() (*DescribeLogStreamsResponse, error)
func (*DescribeLogStreamsRequest) SetLimit ¶
func (req *DescribeLogStreamsRequest) SetLimit(limit int)
func (*DescribeLogStreamsRequest) VerifyInput ¶
func (req *DescribeLogStreamsRequest) VerifyInput() error
type ErrorResult ¶
type ErrorResult struct { Type string `json:"__type"` Message string `json:"message"` StatusCode int }
func (*ErrorResult) Error ¶
func (e *ErrorResult) Error() string
type GetLogEventsRequest ¶
type GetLogEventsRequest struct { awsgo.RequestBuilder LogGroupName string `json:"logGroupName"` LogStreamName string `json:"logStreamName"` EndTime *int64 `json:"endTime,omitempty"` Limit *int `json:"limit,omitempty"` NextToken string `json:"nextToken,omitempty"` StartFromHead bool `json:"startFromHead"` StartTime *int64 `json:"startTime,omitempty"` }
func NewGetLogEventsRequest ¶
func NewGetLogEventsRequest() *GetLogEventsRequest
func (GetLogEventsRequest) DeMarshalResponse ¶
func (req GetLogEventsRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}
func (GetLogEventsRequest) Request ¶
func (req GetLogEventsRequest) Request() (*GetLogEventsResponse, error)
func (*GetLogEventsRequest) SetLimit ¶
func (req *GetLogEventsRequest) SetLimit(limit int)
func (*GetLogEventsRequest) SetTimeRange ¶
func (req *GetLogEventsRequest) SetTimeRange(start time.Time, end time.Time)
func (*GetLogEventsRequest) VerifyInput ¶
func (req *GetLogEventsRequest) VerifyInput() error
type GetLogEventsResponse ¶
type GetLogEventsResponse struct { NextBackwardToken string `json:"nextBackwardToken"` NextForwardToken string `json:"nextForwardToken"` Events []LogEventsResponse `json:"events"` }
type GetMetricStatisticsRequest ¶
type GetMetricStatisticsRequest struct { awsgo.RequestBuilder Dimensions []MetricDimensions EndTime time.Time MetricName string Namespace string Period int StartTime time.Time Statistics []string Unit string }
func NewGetMetricStatisticsRequest ¶
func NewGetMetricStatisticsRequest() *GetMetricStatisticsRequest
func (GetMetricStatisticsRequest) DeMarshalResponse ¶
func (gir GetMetricStatisticsRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}
func (GetMetricStatisticsRequest) Request ¶
func (gir GetMetricStatisticsRequest) Request() (*GetMetricStatisticsResponse, error)
func (*GetMetricStatisticsRequest) VerifyInput ¶
func (gir *GetMetricStatisticsRequest) VerifyInput() error
type GetMetricStatisticsResponse ¶
type GetMetricStatisticsResponse struct { ResponseMetadata awsgo.ResponseMetaData GetMetricStatisticsResult GetMetricStatisticsResult }
type GetMetricStatisticsResult ¶
type GetMetricStatisticsResult struct { Label string Datapoints []GetMetricResultDatapoint `xml:"Datapoints>member"` }
type ListMetricsRequest ¶
type ListMetricsRequest struct { awsgo.RequestBuilder Dimensions []MetricDimensions MetricName string Namespace string NextToken string }
func NewListMetricsRequest ¶
func NewListMetricsRequest() *ListMetricsRequest
func (ListMetricsRequest) DeMarshalResponse ¶
func (req ListMetricsRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}
func (ListMetricsRequest) Request ¶
func (req ListMetricsRequest) Request() (*ListMetricsResponse, error)
func (*ListMetricsRequest) VerifyInput ¶
func (req *ListMetricsRequest) VerifyInput() error
type ListMetricsResponse ¶
type ListMetricsResponse struct { ResponseMetadata awsgo.ResponseMetaData ListMetricsResult ListMetricsResult }
type ListMetricsResult ¶
type ListMetricsResult struct { NextToken string Metrics []MetricInfo `xml:"Metrics>member"` }
type LogEventsResponse ¶
type LogStream ¶
type LogStream struct { Arn string `json:"arn"` CreationTime int64 `json:"creationTime"` FirstEventTimestamp int64 `json:"firstEventTimestamp"` LastEventTimestamp int64 `json:"lastEventTimestamp"` LastIngestionTime int64 `json:"lastIngestionTime"` LogStreamName string `json:"logStreamName"` StoredBytes int64 `json:"storedBytes"` UploadSequenceToken string `json:"uploadSequenceToken"` }
type MetricDatum ¶
type MetricDatum struct { Dimensions []MetricDimensions MetricName string StatisticValues *StatisticSet Timestamp *time.Time Unit string Value *float64 }
type MetricDimensions ¶
type MetricInfo ¶
type MetricInfo struct { Dimensions []MetricDimensions `xml:"Dimensions>member"` MetricName string Namespace string }
type PutLogEventsRequest ¶
type PutLogEventsRequest struct { awsgo.RequestBuilder LogGroupName string `json:"logGroupName"` LogStreamName string `json:"logStreamName"` SequenceToken string `json:"sequenceToken,omitempty"` LogEvents []LogEvents `json:"logEvents"` }
func NewPutLogEventsRequest ¶
func NewPutLogEventsRequest() *PutLogEventsRequest
func (*PutLogEventsRequest) AddEvent ¶
func (req *PutLogEventsRequest) AddEvent(message string, at time.Time)
func (PutLogEventsRequest) DeMarshalResponse ¶
func (req PutLogEventsRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}
func (PutLogEventsRequest) Request ¶
func (req PutLogEventsRequest) Request() (*PutLogEventsResponse, error)
events and entire content cannot be above 32,768 bytes. If you are unsure of your content size, use RequestSplit. It will use multiple requests to send your logs.
func (PutLogEventsRequest) RequestSplit ¶
func (req PutLogEventsRequest) RequestSplit() (*PutLogEventsResponse, error)
func (*PutLogEventsRequest) VerifyInput ¶
func (req *PutLogEventsRequest) VerifyInput() error
type PutLogEventsResponse ¶
type PutLogEventsResponse struct {
NextSequenceToken string `json:"nextSequenceToken"`
}
type PutMetricRequest ¶
type PutMetricRequest struct { awsgo.RequestBuilder MetricData []MetricDatum Namespace string }
func NewPutMetricRequest ¶
func NewPutMetricRequest() *PutMetricRequest
func (PutMetricRequest) DeMarshalResponse ¶
func (gir PutMetricRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}
func (PutMetricRequest) Request ¶
func (gir PutMetricRequest) Request() (*PutMetricResponse, error)
func (*PutMetricRequest) VerifyInput ¶
func (gir *PutMetricRequest) VerifyInput() error
type PutMetricResponse ¶
type PutMetricResponse struct {
ResponseMetadata awsgo.ResponseMetaData
}
type PutRetentionPolicyRequest ¶
type PutRetentionPolicyRequest struct { awsgo.RequestBuilder LogGroupName string `json:"logGroupName"` RetentionInDays int `json:"retentionInDays"` }
func NewPutRetentionPolicyRequest ¶
func NewPutRetentionPolicyRequest() *PutRetentionPolicyRequest
func (PutRetentionPolicyRequest) DeMarshalResponse ¶
func (req PutRetentionPolicyRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}
func (PutRetentionPolicyRequest) Request ¶
func (req PutRetentionPolicyRequest) Request() (*PutRetentionPolicyResponse, error)
func (*PutRetentionPolicyRequest) VerifyInput ¶
func (req *PutRetentionPolicyRequest) VerifyInput() error
type PutRetentionPolicyResponse ¶
type PutRetentionPolicyResponse struct { }
Click to show internal directories.
Click to hide internal directories.