Documentation ¶
Index ¶
- Constants
- Variables
- func BuildMetadataProvider(logger logging.Logger, c *config.Config) cloud.MetadataProvider
- type BufferedCollector
- func (s *BufferedCollector) CollectEvent(class, action string)
- func (s *BufferedCollector) CollectMetadata(accountMetadata *Metadata)
- func (s *BufferedCollector) Done() <-chan bool
- func (s *BufferedCollector) Run(ctx context.Context)
- func (s *BufferedCollector) SetInstallationID(installationID string)
- type BufferedCollectorOpts
- type Collector
- type FlushTicker
- type HTTPSender
- type InputEvent
- type Metadata
- type MetadataEntry
- type Metric
- type Sender
- type TimeFn
- type TimeTicker
Constants ¶
View Source
const BlockstoreTypeKey = "blockstore_type"
Variables ¶
View Source
var ( ErrSendError = errors.New("stats: send error") ErrNoInstallationID = fmt.Errorf("installation ID is missing: %w", ErrSendError) )
Functions ¶
func BuildMetadataProvider ¶
Types ¶
type BufferedCollector ¶
type BufferedCollector struct {
// contains filtered or unexported fields
}
func NewBufferedCollector ¶
func NewBufferedCollector(installationID string, c *config.Config, opts ...BufferedCollectorOpts) *BufferedCollector
func (*BufferedCollector) CollectEvent ¶
func (s *BufferedCollector) CollectEvent(class, action string)
func (*BufferedCollector) CollectMetadata ¶
func (s *BufferedCollector) CollectMetadata(accountMetadata *Metadata)
func (*BufferedCollector) Done ¶
func (s *BufferedCollector) Done() <-chan bool
func (*BufferedCollector) Run ¶
func (s *BufferedCollector) Run(ctx context.Context)
func (*BufferedCollector) SetInstallationID ¶
func (s *BufferedCollector) SetInstallationID(installationID string)
type BufferedCollectorOpts ¶
type BufferedCollectorOpts func(s *BufferedCollector)
func WithFlushInterval ¶
func WithFlushInterval(d time.Duration) BufferedCollectorOpts
func WithSendTimeout ¶
func WithSendTimeout(d time.Duration) BufferedCollectorOpts
func WithSender ¶
func WithSender(sender Sender) BufferedCollectorOpts
func WithTicker ¶
func WithTicker(t FlushTicker) BufferedCollectorOpts
func WithWriteBufferSize ¶
func WithWriteBufferSize(bufferSize int) BufferedCollectorOpts
type FlushTicker ¶
type HTTPSender ¶
type HTTPSender struct {
// contains filtered or unexported fields
}
func NewHTTPSender ¶
func NewHTTPSender(addr string, timeFunc TimeFn) *HTTPSender
func (*HTTPSender) UpdateMetadata ¶
func (s *HTTPSender) UpdateMetadata(ctx context.Context, m Metadata) error
type InputEvent ¶
type Metadata ¶
type Metadata struct { InstallationID string `json:"installation_id"` Entries []MetadataEntry `json:"entries"` }
func NewMetadata ¶
func NewMetadata(ctx context.Context, logger logging.Logger, blockstoreType string, authMetadataManager auth.MetadataManager, cloudMetadataProvider cloud.MetadataProvider) *Metadata
type MetadataEntry ¶
type Sender ¶
type Sender interface { SendEvent(ctx context.Context, installationID, processID string, m []Metric) error UpdateMetadata(ctx context.Context, m Metadata) error }
func NewDummySender ¶
func NewDummySender() Sender
type TimeTicker ¶
type TimeTicker struct {
// contains filtered or unexported fields
}
func (*TimeTicker) Stop ¶
func (t *TimeTicker) Stop()
func (*TimeTicker) Tick ¶
func (t *TimeTicker) Tick() <-chan time.Time
Click to show internal directories.
Click to hide internal directories.