profile

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStore

func NewStore(db *gorm.DB, tableName string, statusStore protocol.StatusStore) protocol.ProfileStore

NewStore to construct status store

Types

type MetricStore

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

func NewMetricStore

func NewMetricStore(db *gorm.DB, tableName string) *MetricStore

NewMetricStore is constructor of MetricStore

func (*MetricStore) GetMetricsByProfileID

func (m *MetricStore) GetMetricsByProfileID(ID string) ([]*metric.Metric, error)

func (*MetricStore) Store

func (m *MetricStore) Store(profile *job.Profile, metrics []*metric.Metric) error

type Service

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

Service is profile service

func NewService

func NewService(profileStore protocol.ProfileStore,
	metricGenerator protocol.MetricGenerator,
	publisher protocol.Publisher,
	messageBuilderFactory protocol.MessageProviderFactory,
	statusStore protocol.StatusStore,
	statsFactory stats.ClientBuilder) *Service

NewService to construct profile service

func (*Service) CreateProfile

func (s *Service) CreateProfile(profile *job.Profile) (*job.Profile, error)

CreateProfile to create profile

func (*Service) Get

func (s *Service) Get(ID string) (*job.Profile, error)

Get to get profile

func (*Service) GetLog

func (s *Service) GetLog(profileID string) ([]*protocol.Status, error)

GetLog to get profile log

func (*Service) WaitAll

func (s *Service) WaitAll(ctx context.Context) error

WaitAll to wait until task finished

type Store

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

Store as profile store

func (*Store) Create

func (s *Store) Create(profile *job.Profile) (*job.Profile, error)

Create to store created profile

func (*Store) Get

func (s *Store) Get(ID string) (*job.Profile, error)

Get to get profile

func (*Store) Update

func (s *Store) Update(profile *job.Profile) error

Update only insert new status of profile, all field in profile is immutable

Jump to

Keyboard shortcuts

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