Versions in this module Expand all Collapse all v0 v0.1.1 Feb 21, 2022 v0.1.0 Feb 21, 2022 Changes in this version + func ProfileTypeFromDBModel(ptype ProfileType) (profile.ProfileType, error) + type Config struct + DSN string + SamplesWriterPoolSize int + func (conf *Config) CreateStorage(logger *log.Logger) (*Storage, io.Closer, error) + func (conf *Config) RegisterFlags(f *flag.FlagSet) + type ProfileKey [12]byte + func NewProfileKey(t time.Time) (pk ProfileKey) + func (pk *ProfileKey) Scan(src interface{}) error + func (pk ProfileKey) String() string + func (pk ProfileKey) Value() (driver.Value, error) + type ProfileType uint8 + const TypeBlock + const TypeCPU + const TypeGoroutine + const TypeHeap + const TypeMutex + const TypeOther + const TypeThreadcreate + func ProfileTypeToDBModel(ptype profile.ProfileType) (ProfileType, error) + type ProfilesWriter interface + WriteProfile func(ctx context.Context, pk ProfileKey, ptype ProfileType, createdAt time.Time, ...) error + func NewProfilesWriter(logger *log.Logger, db *sql.DB) ProfilesWriter + type ProfilesWriterWrapper func(ProfilesWriter) ProfilesWriter + type SamplesWriter interface + WriteSamples func(ctx context.Context, pk ProfileKey, samples []*pprofProfile.Sample, ...) error + func NewSamplesWriter(logger *log.Logger, db *sql.DB) SamplesWriter + type Storage struct + func NewStorage(logger *log.Logger, db *sql.DB, profilesWriter ProfilesWriter, ...) (*Storage, error) + func (st *Storage) FindProfileIDs(ctx context.Context, params *storage.FindProfilesParams) (pids []profile.ID, err error) + func (st *Storage) FindProfiles(ctx context.Context, params *storage.FindProfilesParams) (metas []profile.Meta, err error) + func (st *Storage) ListProfiles(ctx context.Context, pid []profile.ID) (storage.ProfileList, error) + func (st *Storage) ListServices(ctx context.Context) (services []string, err error) + func (st *Storage) WriteProfile(ctx context.Context, params *storage.WriteProfileParams, r io.Reader) (profile.Meta, error)