Help us shape the future of Go! Take the 2026 Go Developer Survey

debuginfo

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: Apache-2.0 Imports: 28 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BucketValid = BucketRule{}
View Source
var ErrDebugInfoNotFound = errors.New("debug info not found")
View Source
var Valid = ValidRule{}

Valid is the ValidRule.

Functions

This section is empty.

Types

type BucketRule added in v0.2.0

type BucketRule struct{}

func (BucketRule) Validate added in v0.2.0

func (r BucketRule) Validate(value interface{}) error

Validate the bucket config.

type CacheConfig

type CacheConfig struct {
	Type   CacheProvider `yaml:"type"`
	Config interface{}   `yaml:"config"`
}

type CacheProvider

type CacheProvider string
const (
	FILESYSTEM CacheProvider = "FILESYSTEM"
)

type Client added in v0.8.0

type Client struct {
	// contains filtered or unexported fields
}

func NewDebugInfoClient

func NewDebugInfoClient(conn *grpc.ClientConn) *Client

func (*Client) Exists added in v0.8.0

func (c *Client) Exists(ctx context.Context, buildID string) (bool, error)

func (*Client) Upload added in v0.8.0

func (c *Client) Upload(ctx context.Context, buildID string, r io.Reader) (uint64, error)

type Config

type Config struct {
	Bucket *client.BucketConfig `yaml:"bucket"`
	Cache  *CacheConfig         `yaml:"cache"`
}

type DebugInfodClient added in v0.8.0

type DebugInfodClient interface {
	GetDebugInfo(ctx context.Context, buildid string) (io.ReadCloser, error)
}

type DebugInfodClientObjectStorageCache added in v0.8.0

type DebugInfodClientObjectStorageCache struct {
	// contains filtered or unexported fields
}

func NewDebugInfodClientWithObjectStorageCache added in v0.8.0

func NewDebugInfodClientWithObjectStorageCache(logger log.Logger, config *Config, h DebugInfodClient) (*DebugInfodClientObjectStorageCache, error)

func (*DebugInfodClientObjectStorageCache) GetDebugInfo added in v0.8.0

func (c *DebugInfodClientObjectStorageCache) GetDebugInfo(ctx context.Context, buildID string) (io.ReadCloser, error)

type FilesystemCacheConfig

type FilesystemCacheConfig struct {
	Directory string `yaml:"directory"`
}

type HTTPDebugInfodClient added in v0.8.0

type HTTPDebugInfodClient struct {
	UpstreamServer *url.URL
	// contains filtered or unexported fields
}

func NewHTTPDebugInfodClient added in v0.8.0

func NewHTTPDebugInfodClient(logger log.Logger, serverURL string, timeoutDuration time.Duration) (*HTTPDebugInfodClient, error)

func (*HTTPDebugInfodClient) GetDebugInfo added in v0.8.0

func (c *HTTPDebugInfodClient) GetDebugInfo(ctx context.Context, buildID string) (io.ReadCloser, error)

type Store

type Store struct {
	debuginfopb.UnimplementedDebugInfoServiceServer
	// contains filtered or unexported fields
}

func NewStore

func NewStore(logger log.Logger, symbolizer *symbol.Symbolizer, config *Config, debuginfodClient DebugInfodClient) (*Store, error)

NewStore returns a new debug info store.

func (*Store) Exists

func (*Store) Symbolize

func (s *Store) Symbolize(ctx context.Context, m *pb.Mapping, locations ...*metastore.Location) (map[*metastore.Location][]metastore.LocationLine, error)

func (*Store) Upload

type UploadReader

type UploadReader struct {
	// contains filtered or unexported fields
}

func (*UploadReader) Read

func (r *UploadReader) Read(p []byte) (int, error)

type ValidRule added in v0.2.0

type ValidRule struct{}

ValidRule is a validation rule for the Config. It implements the validation.Rule interface.

func (ValidRule) Validate added in v0.2.0

func (v ValidRule) Validate(value interface{}) error

Validate returns an error if the config is not valid.

Jump to

Keyboard shortcuts

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