Documentation ¶
Index ¶
- Constants
- type CallEvent
- type DAL
- func (d *DAL) DeleteOldEvents(ctx context.Context, eventType EventType, age time.Duration) (int64, error)
- func (d *DAL) InsertCallEvent(ctx context.Context, call *CallEvent) error
- func (d *DAL) InsertLogEvent(ctx context.Context, log *LogEvent) error
- func (d *DAL) QueryTimeline(ctx context.Context, limit int, filters ...TimelineFilter) ([]TimelineEvent, error)
- type DeploymentCreatedEvent
- type DeploymentUpdatedEvent
- type EventType
- type LogEvent
- type TimelineEvent
- type TimelineFilter
- func FilterCall(sourceModule optional.Option[string], destModule string, ...) TimelineFilter
- func FilterDeployments(deploymentKeys ...model.DeploymentKey) TimelineFilter
- func FilterDescending() TimelineFilter
- func FilterIDRange(higherThan, lowerThan int64) TimelineFilter
- func FilterLogLevel(level log.Level) TimelineFilter
- func FilterRequests(requestKeys ...model.RequestKey) TimelineFilter
- func FilterTimeRange(olderThan, newerThan time.Time) TimelineFilter
- func FilterTypes(types ...sql.EventType) TimelineFilter
Constants ¶
View Source
const ( EventTypeLog = sql.EventTypeLog EventTypeCall = sql.EventTypeCall EventTypeDeploymentCreated = sql.EventTypeDeploymentCreated EventTypeDeploymentUpdated = sql.EventTypeDeploymentUpdated )
Supported event types.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallEvent ¶
type CallEvent struct { ID int64 DeploymentKey model.DeploymentKey RequestKey optional.Option[model.RequestKey] ParentRequestKey optional.Option[model.RequestKey] Time time.Time SourceVerb optional.Option[schema.Ref] DestVerb schema.Ref Duration time.Duration Request json.RawMessage Response json.RawMessage Error optional.Option[string] Stack optional.Option[string] }
type DAL ¶
func New ¶
func New(conn libdal.Connection, encryption *encryption.Service) *DAL
func (*DAL) DeleteOldEvents ¶
func (*DAL) InsertCallEvent ¶
func (*DAL) QueryTimeline ¶
func (d *DAL) QueryTimeline(ctx context.Context, limit int, filters ...TimelineFilter) ([]TimelineEvent, error)
type DeploymentCreatedEvent ¶
type DeploymentCreatedEvent struct { ID int64 DeploymentKey model.DeploymentKey Time time.Time Language string ModuleName string MinReplicas int ReplacedDeployment optional.Option[model.DeploymentKey] }
func (*DeploymentCreatedEvent) GetID ¶
func (e *DeploymentCreatedEvent) GetID() int64
type DeploymentUpdatedEvent ¶
type DeploymentUpdatedEvent struct { ID int64 DeploymentKey model.DeploymentKey Time time.Time MinReplicas int PrevMinReplicas int }
func (*DeploymentUpdatedEvent) GetID ¶
func (e *DeploymentUpdatedEvent) GetID() int64
type LogEvent ¶
type TimelineEvent ¶
type TimelineEvent interface { GetID() int64 // contains filtered or unexported methods }
TimelineEvent types.
type TimelineFilter ¶
type TimelineFilter func(query *eventFilter)
func FilterCall ¶
func FilterCall(sourceModule optional.Option[string], destModule string, destVerb optional.Option[string]) TimelineFilter
FilterCall filters call events between the given modules.
May be called multiple times.
func FilterDeployments ¶
func FilterDeployments(deploymentKeys ...model.DeploymentKey) TimelineFilter
func FilterDescending ¶
func FilterDescending() TimelineFilter
FilterDescending returns events in descending order.
func FilterIDRange ¶
func FilterIDRange(higherThan, lowerThan int64) TimelineFilter
FilterIDRange filters events between the given IDs, inclusive.
func FilterLogLevel ¶
func FilterLogLevel(level log.Level) TimelineFilter
func FilterRequests ¶
func FilterRequests(requestKeys ...model.RequestKey) TimelineFilter
func FilterTimeRange ¶
func FilterTimeRange(olderThan, newerThan time.Time) TimelineFilter
FilterTimeRange filters events between the given times, inclusive.
Either maybe be zero to indicate no upper or lower bound.
func FilterTypes ¶
func FilterTypes(types ...sql.EventType) TimelineFilter
Click to show internal directories.
Click to hide internal directories.