pgo

package module
v0.0.0-...-9f08e09 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 12 Imported by: 0

README

pgo-collector

go profile collector

go tool pprof -http=":8000" pprofbin ./cpu.pprof

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiClient

type ApiClient struct {
	Client             *http.Client
	DeadlineRetryCount int
}

func NewHttpClient

func NewHttpClient() *ApiClient

func (*ApiClient) Get

func (a *ApiClient) Get(url string) (ApiResponse, error)

type ApiResponse

type ApiResponse struct {
	Body       []byte
	StatusCode int
}

type Collector

type Collector interface {
	Start() error
}

func NewCollector

func NewCollector(endpoint string, cronTime string, uploader Uploader, applicationName string) Collector

type Uploader

type Uploader interface {
	Create(ctx context.Context, bucketName string, location string)
	Upload(ctx context.Context, bucketName string, objectName string, buf []byte)
	UploadFile(ctx context.Context, bucketName string, objectName string, filePath string)
	Download(ctx context.Context, bucketName string, objectName string, filePath string)
	DownloadAll(ctx context.Context, bucketName string) []string
}

func NewUploader

func NewUploader(endpoint string, username string, password string, token string) Uploader

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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