store

package
v0.0.0-...-bfa2730 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrgTPStore

type OrgTPStore interface {
	DeleteTracepoints(ids ...string) error

	AddTracepoint(tracepoint *tp.TracePointConfig) error
	FindTracepoints(request *deepql.CommandRequest) ([]*tp.TracePointConfig, error)
	LoadAll() ([]*tp.TracePointConfig, error)
	// contains filtered or unexported methods
}

type ResourceTPStore

type ResourceTPStore interface {
	ProcessRequest(req *deeppb.LoadTracepointRequest) (*deeppb.LoadTracepointResponse, error)
	AddTracepoint(tp *tp.TracePointConfig) error
	DeleteTracepoints(ids ...string) error
}

type TPStore

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

func NewStore

func NewStore(store storage.Store) (*TPStore, error)

NewStore will create a new store to handle reading and writing to disk

func (*TPStore) Flush

func (s *TPStore) Flush(ctx context.Context, store OrgTPStore) error

Flush will sync the in memory changes to disk

func (*TPStore) FlushAll

func (s *TPStore) FlushAll(ctx context.Context) error

func (*TPStore) ForOrg

func (s *TPStore) ForOrg(ctx context.Context, id string) (OrgTPStore, error)

ForOrg will find or create a in memory store for the given org id this will load the org block from storage, if we do not already have a copy

func (*TPStore) ForResource

func (s *TPStore) ForResource(ctx context.Context, id string, resource []*cp.KeyValue) (ResourceTPStore, error)

ForResource will find or create a new in memory store for the defined resource these stores are partitioned by org id

Directories

Path Synopsis
v1

Jump to

Keyboard shortcuts

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