Documentation ¶
Index ¶
- Constants
- func CanonicalHeadersBasic(r *http.Request, signerHeaders []string) string
- func CanonicalQueryStringBasic(queryMap map[string]string) string
- func CanonicalRequestBasic(r *http.Request, signedHeaders []string, queryMap map[string]string) (string, error)
- func CanonicalURIBasic(r *http.Request) string
- func DerivationAuthHeaderValue(signature, accessKey string, info string, signedHeaders []string) string
- func GetDerivationKey(accessKey string, secretKey string, info string) (string, error)
- func HexEncodeSHA256Hash(body []byte) (string, error)
- func SignHeaderBasic(r *http.Request, ak string, sk string, derivedAuthServiceName string, ...) (map[string]string, error)
- func SignStringToSign(stringToSign string, signingKey []byte) (string, error)
- func SignedHeadersBasic(headers map[string][]string) []string
- func StringToSignDerived(canonicalRequest string, info string, t time.Time) (string, error)
- type BatchGetLog
- type Client
- type ClientConsumerWorker
- type Cursor
- type DefaultLogConsumerCheckPointTracker
- type FetchedLogData
- type ILogConsumerCheckPointTracker
- type ILogConsumerProcessor
- type ILogConsumerProcessorFactory
- type ILogConsumerSTSToken
- type LogConsumerClientAdapter
- type LogConsumerConfig
- type LogConsumerHeartBeat
- type LogData
- type LogShardConsumer
- type STSTokenConfig
- type ShardCheckPoint
- type TaskResult
Constants ¶
View Source
const ( INITIALIZING = "initializing" PROCESSING = "processing" SHUTTING_DOWN = "shutdown" SHUTDOWN_COMPLETE = "shutdown_complete" )
View Source
const ( BasicDateFormat = "20060102T150405Z" HeaderXDate = "X-Sdk-Date" HeaderHost = "host" HeaderAuthorization = "Authorization" HeaderContentSha256 = "X-Sdk-Content-Sha256" DerivationAlgorithm = "V11-HMAC-SHA256" DerivedDateFormat = "20060102" )
Variables ¶
This section is empty.
Functions ¶
func CanonicalHeadersBasic ¶
func CanonicalRequestBasic ¶
func CanonicalURIBasic ¶
func GetDerivationKey ¶
func HexEncodeSHA256Hash ¶
func SignHeaderBasic ¶
func SignStringToSign ¶
func SignedHeadersBasic ¶
Types ¶
type BatchGetLog ¶
type ClientConsumerWorker ¶
type ClientConsumerWorker struct {
// contains filtered or unexported fields
}
func GetClientConsumerWorker ¶
func GetClientConsumerWorker(factory ILogConsumerProcessorFactory, config *LogConsumerConfig) *ClientConsumerWorker
func (*ClientConsumerWorker) Run ¶
func (w *ClientConsumerWorker) Run()
func (*ClientConsumerWorker) Shutdown ¶
func (w *ClientConsumerWorker) Shutdown()
type DefaultLogConsumerCheckPointTracker ¶
type DefaultLogConsumerCheckPointTracker struct {
// contains filtered or unexported fields
}
func (*DefaultLogConsumerCheckPointTracker) GetCheckPoint ¶
func (tracker *DefaultLogConsumerCheckPointTracker) GetCheckPoint() string
func (*DefaultLogConsumerCheckPointTracker) GetCurrentCursor ¶
func (tracker *DefaultLogConsumerCheckPointTracker) GetCurrentCursor() string
func (*DefaultLogConsumerCheckPointTracker) SaveCheckPoint ¶
func (tracker *DefaultLogConsumerCheckPointTracker) SaveCheckPoint(persistent bool) error
type FetchedLogData ¶
type FetchedLogData struct {
// contains filtered or unexported fields
}
type ILogConsumerProcessor ¶
type ILogConsumerProcessor interface { Initialize(shardId string) Process(logGroups []LogData, checkPointTracker ILogConsumerCheckPointTracker) string Shutdown(checkPointTracker ILogConsumerCheckPointTracker) error }
type ILogConsumerProcessorFactory ¶
type ILogConsumerProcessorFactory interface {
GeneratorProcessor() ILogConsumerProcessor
}
type ILogConsumerSTSToken ¶
type ILogConsumerSTSToken interface { // GetSTSTokenConfig SDK会定期从此方法中获取临时AK, 临时SK, 临时securityToken. 如果临时认证信息有变化, 在此方法中实现即可 GetSTSTokenConfig() STSTokenConfig }
type LogConsumerClientAdapter ¶
type LogConsumerClientAdapter struct { ILogConsumerSTSToken ILogConsumerSTSToken // contains filtered or unexported fields }
func GetLogConsumerClientAdapter ¶
func GetLogConsumerClientAdapter(config *LogConsumerConfig) *LogConsumerClientAdapter
type LogConsumerConfig ¶
type LogConsumerConfig struct { RegionName string ProjectId string LogGroupId string LogStreamId string AccessKeyId string AccessKeySecret string ConsumerGroupName string SecurityToken string ILogConsumerSTSToken ILogConsumerSTSToken StartTimeNs time.Time EndTimeNs time.Time FetchIntervalMillis int64 BatchSize int // contains filtered or unexported fields }
func GetConsumerConfig ¶
func GetConsumerConfig() *LogConsumerConfig
type LogConsumerHeartBeat ¶
type LogConsumerHeartBeat struct {
// contains filtered or unexported fields
}
func GetLogConsumerHeartBeat ¶
func GetLogConsumerHeartBeat(client *LogConsumerClientAdapter, config *LogConsumerConfig) *LogConsumerHeartBeat
type LogShardConsumer ¶
type LogShardConsumer struct { ConsumerStatus string // contains filtered or unexported fields }
func (*LogShardConsumer) InitializeTask ¶
func (w *LogShardConsumer) InitializeTask()
func (*LogShardConsumer) LogConsumerFetchTask ¶
func (w *LogShardConsumer) LogConsumerFetchTask()
func (*LogShardConsumer) ProcessTask ¶
func (w *LogShardConsumer) ProcessTask(fetchedData []LogData)
func (*LogShardConsumer) ShutDownTask ¶
func (w *LogShardConsumer) ShutDownTask()
type STSTokenConfig ¶
type ShardCheckPoint ¶
type TaskResult ¶
type TaskResult struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.