chqservicegraphexporter

package module
v0.0.0-...-518faf8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() exporter.Factory

Types

type Config

type Config struct {
	confighttp.ClientConfig `mapstructure:",squash"`
}

type Edge

type Edge struct {
	Client         string `json:"client"`
	Server         string `json:"server"`
	ConnectionType string `json:"connection_type"`
}

Edge represents an edge in the system

type EdgeCache

type EdgeCache struct {
	sync.Mutex

	Edges map[Edge]int64
	// contains filtered or unexported fields
}

EdgeCache holds edges and provides Add and Flush methods

func NewEdgeCache

func NewEdgeCache(interval time.Duration, timeProvider func() int64) *EdgeCache

NewEdgeCache initializes and returns a new EdgeCache with default time provider

func (*EdgeCache) Add

func (e *EdgeCache) Add(edge Edge)

Add adds an Edge to the cache if it doesn't already exist

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL