Documentation ¶
Index ¶
- Constants
- Variables
- func CrossTypeCompare(a interface{}, b interface{}) (int, error)
- func CrossTypeEqual(a interface{}, b interface{}) bool
- func GetField(obj map[string]interface{}, k string) (interface{}, error)
- func IPToString(ip net.IP) string
- func IPv6Supported() bool
- func IsCaptureAllowed(nodeType string) bool
- func JsonDecode(r io.Reader, i interface{}) error
- func MaxInt64(a, b int64) int64
- func MinInt64(a, b int64) int64
- func Retry(fnc func() error, try int, delay time.Duration) error
- func SetField(obj map[string]interface{}, k string, v interface{}) bool
- func ToFloat64(f interface{}) (float64, error)
- func ToInt64(i interface{}) (int64, error)
- func UnixMillis(t time.Time) int64
- type CaptureType
- type Iterator
- type Metric
- type NetNSContext
- type PortAllocator
- type ServiceAddress
- type ServiceType
- type SortOrder
- type TimeSlice
- type TimedMetric
Constants ¶
View Source
const ( StoppedState = iota + 1 RunningState StoppingState )
Variables ¶
View Source
var ( InvalidPortRange = errors.New("Invalid port range") NoPortLeft = errors.New("No free port left") )
View Source
var ( CantCompareInterface = errors.New("Can't compare interface") ErrFieldNotFound = errors.New("Field not found") ErrFieldWrongType = errors.New("Field has wrong type") )
View Source
var (
CaptureTypes = map[string]CaptureType{}
)
Functions ¶
func CrossTypeCompare ¶
func CrossTypeEqual ¶
func CrossTypeEqual(a interface{}, b interface{}) bool
func IPToString ¶
func IPv6Supported ¶
func IPv6Supported() bool
func IsCaptureAllowed ¶
func JsonDecode ¶
func Retry ¶
Retry tries to execute the given function until a success applying a delay between each try
func UnixMillis ¶
Types ¶
type CaptureType ¶
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
func NewIterator ¶
type NetNSContext ¶
type NetNSContext struct {
// contains filtered or unexported fields
}
func NewNetNsContext ¶
func NewNetNsContext(path string) (*NetNSContext, error)
func (*NetNSContext) Close ¶
func (n *NetNSContext) Close()
func (*NetNSContext) Quit ¶
func (n *NetNSContext) Quit() error
type PortAllocator ¶
func NewPortAllocator ¶
func NewPortAllocator(min, max int) (*PortAllocator, error)
func (*PortAllocator) Allocate ¶
func (p *PortAllocator) Allocate() (int, error)
func (*PortAllocator) Release ¶
func (p *PortAllocator) Release(i int)
func (*PortAllocator) ReleaseAll ¶
func (p *PortAllocator) ReleaseAll()
func (*PortAllocator) Set ¶
func (p *PortAllocator) Set(i int, obj interface{})
type ServiceAddress ¶
func ServiceAddressFromString ¶
func ServiceAddressFromString(addressPort string) (ServiceAddress, error)
type ServiceType ¶
type ServiceType string
const ( AnalyzerService ServiceType = "analyzer" AgentService ServiceType = "agent" )
func (ServiceType) String ¶
func (st ServiceType) String() string
type TimeSlice ¶
func NewTimeSlice ¶
type TimedMetric ¶
func (*TimedMetric) GetFieldInt64 ¶
func (tm *TimedMetric) GetFieldInt64(field string) (int64, error)
func (*TimedMetric) MarshalJSON ¶
func (tm *TimedMetric) MarshalJSON() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.