profile

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const TestID = ID("bpc00mript33iv4net00")

Variables

This section is empty.

Functions

func JoinIDs

func JoinIDs(ids ...ID) (string, error)

Types

type ID

type ID string

func SplitIDs

func SplitIDs(s string) ([]ID, error)

type Label

type Label struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Labels

type Labels []Label

func LabelsFromMap

func LabelsFromMap(m map[string]interface{}) Labels

func (Labels) Add

func (labels Labels) Add(labels2 Labels) Labels

func (Labels) EncodeTo

func (labels Labels) EncodeTo(w LabelsEncoder)

func (Labels) Equal

func (labels Labels) Equal(labels2 Labels) bool

func (*Labels) FromString

func (labels *Labels) FromString(s string) (err error)

func (Labels) Include

func (labels Labels) Include(labels2 Labels) bool

XXX(narqo): doesn't cover the case where Labels have multiple values of a key.

func (Labels) Len

func (labels Labels) Len() int

func (Labels) Less

func (labels Labels) Less(i, j int) bool

func (Labels) String

func (labels Labels) String() string

func (Labels) Swap

func (labels Labels) Swap(i, j int)

type LabelsEncoder

type LabelsEncoder interface {
	io.ByteWriter
	io.StringWriter
}

type Meta

type Meta struct {
	ProfileID  ID          `json:"profile_id"`
	ExternalID ID          `json:"external_id,omitempty"`
	Service    string      `json:"service"`
	Type       ProfileType `json:"type"`
	Labels     Labels      `json:"labels,omitempty"`
	CreatedAt  time.Time   `json:"created_at,omitempty"`
}

type ProfileType

type ProfileType uint8
const (
	TypeUnknown ProfileType = iota
	TypeCPU
	TypeHeap
	TypeBlock
	TypeMutex
	TypeGoroutine
	TypeThreadcreate

	TypeOther ProfileType = 127
	TypeTrace ProfileType = 128
)

func (*ProfileType) FromString

func (ptype *ProfileType) FromString(s string) error

func (ProfileType) String

func (ptype ProfileType) String() string

Jump to

Keyboard shortcuts

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