github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/pkg/agent/upstream/upstream.go (about)

     1  package upstream
     2  
     3  import (
     4  	"time"
     5  
     6  	"github.com/pyroscope-io/pyroscope/pkg/storage/metadata"
     7  	"github.com/pyroscope-io/pyroscope/pkg/structs/transporttrie"
     8  )
     9  
    10  type UploadJob struct {
    11  	Name            string
    12  	StartTime       time.Time
    13  	EndTime         time.Time
    14  	SpyName         string
    15  	SampleRate      uint32
    16  	Units           metadata.Units
    17  	AggregationType metadata.AggregationType
    18  	Trie            *transporttrie.Trie
    19  }
    20  
    21  type Upstream interface {
    22  	Start()
    23  	Stop()
    24  	Upload(u *UploadJob)
    25  }