Documentation
¶
Index ¶
- func Start(ctx context.Context, config Config) error
- type AsyncExecute
- type AsyncExecuteEventType
- type Call
- type Client
- type Config
- type CronScheduled
- type DeploymentCreated
- type DeploymentUpdated
- type Event
- type Ingress
- type Log
- type Metrics
- type PubSubConsume
- type PubSubPublish
- type TimelineFilter
- func FilterCall(filters []*timelinepb.GetTimelineRequest_CallFilter) TimelineFilter
- func FilterDeployments(filters []*timelinepb.GetTimelineRequest_DeploymentFilter) TimelineFilter
- func FilterIDRange(filter *timelinepb.GetTimelineRequest_IDFilter) TimelineFilter
- func FilterLogLevel(f *timelinepb.GetTimelineRequest_LogLevelFilter) TimelineFilter
- func FilterModule(filters []*timelinepb.GetTimelineRequest_ModuleFilter) TimelineFilter
- func FilterRequests(filters []*timelinepb.GetTimelineRequest_RequestFilter) TimelineFilter
- func FilterTimeRange(filter *timelinepb.GetTimelineRequest_TimeFilter) TimelineFilter
- func FilterTypes(filters ...*timelinepb.GetTimelineRequest_EventTypeFilter) TimelineFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AsyncExecute ¶
type AsyncExecute struct {
DeploymentKey model.DeploymentKey
RequestKey optional.Option[string]
EventType AsyncExecuteEventType
Verb schema.Ref
Time time.Time
Error optional.Option[string]
}
func (AsyncExecute) ToEntry ¶
func (a AsyncExecute) ToEntry() (*timelinepb.CreateEventsRequest_EventEntry, error)
type AsyncExecuteEventType ¶
type AsyncExecuteEventType string
const ( AsyncExecuteEventTypeUnkown AsyncExecuteEventType = "unknown" AsyncExecuteEventTypeCron AsyncExecuteEventType = "cron" AsyncExecuteEventTypePubSub AsyncExecuteEventType = "pubsub" )
type Call ¶
type Call struct {
DeploymentKey model.DeploymentKey
RequestKey model.RequestKey
ParentRequestKey optional.Option[model.RequestKey]
StartTime time.Time
DestVerb *schema.Ref
Callers []*schema.Ref
Request *ftlv1.CallRequest
Response result.Result[*ftlv1.CallResponse]
}
func (Call) ToEntry ¶
func (c Call) ToEntry() (*timelinepb.CreateEventsRequest_EventEntry, error)
type Client ¶
type Client struct {
timelinepbconnect.TimelineServiceClient
// contains filtered or unexported fields
}
type Config ¶
type Config struct {
Bind *url.URL `help:"Socket to bind to." default:"http://127.0.0.1:8894" env:"FTL_BIND"`
EventLogRetention *time.Duration `help:"Delete call logs after this time period. 0 to disable" env:"FTL_EVENT_LOG_RETENTION" default:"24h"`
}
func (*Config) SetDefaults ¶
func (c *Config) SetDefaults()
type CronScheduled ¶
type CronScheduled struct {
DeploymentKey model.DeploymentKey
Verb schema.Ref
Time time.Time
ScheduledAt time.Time
Schedule string
Error optional.Option[string]
}
func (CronScheduled) ToEntry ¶
func (e CronScheduled) ToEntry() (*timelinepb.CreateEventsRequest_EventEntry, error)
type DeploymentCreated ¶
type DeploymentCreated struct {
DeploymentKey model.DeploymentKey
Time time.Time
Language string
ModuleName string
MinReplicas int
ReplacedDeployment optional.Option[model.DeploymentKey]
}
func (DeploymentCreated) ToEntry ¶
func (d DeploymentCreated) ToEntry() (*timelinepb.CreateEventsRequest_EventEntry, error)
type DeploymentUpdated ¶
type DeploymentUpdated struct {
DeploymentKey model.DeploymentKey
Time time.Time
MinReplicas int
PrevMinReplicas int
}
func (DeploymentUpdated) ToEntry ¶
func (d DeploymentUpdated) ToEntry() (*timelinepb.CreateEventsRequest_EventEntry, error)
type Event ¶
type Event interface {
ToEntry() (*timelinepb.CreateEventsRequest_EventEntry, error)
// contains filtered or unexported methods
}
type Ingress ¶
type Ingress struct {
DeploymentKey model.DeploymentKey
RequestKey model.RequestKey
StartTime time.Time
Verb *schema.Ref
RequestMethod string
RequestPath string
RequestHeaders http.Header
ResponseStatus int
ResponseHeaders http.Header
RequestBody []byte
ResponseBody []byte
Error optional.Option[string]
}
func (Ingress) ToEntry ¶
func (i Ingress) ToEntry() (*timelinepb.CreateEventsRequest_EventEntry, error)
type Log ¶
type Log struct {
DeploymentKey model.DeploymentKey
RequestKey optional.Option[model.RequestKey]
Time time.Time
Level int32
Attributes map[string]string
Message string
Error optional.Option[string]
}
func (Log) ToEntry ¶
func (l Log) ToEntry() (*timelinepb.CreateEventsRequest_EventEntry, error)
type PubSubConsume ¶
type PubSubConsume struct {
DeploymentKey model.DeploymentKey
RequestKey optional.Option[string]
Time time.Time
DestVerb optional.Option[schema.RefKey]
Topic string
Partition int
Offset int
Error optional.Option[string]
}
func (PubSubConsume) ToEntry ¶
func (p PubSubConsume) ToEntry() (*timelinepb.CreateEventsRequest_EventEntry, error)
type PubSubPublish ¶
type PubSubPublish struct {
DeploymentKey model.DeploymentKey
RequestKey optional.Option[string]
Time time.Time
SourceVerb schema.Ref
Topic string
Partition int
Offset int
Request []byte
Error optional.Option[string]
}
func (PubSubPublish) ToEntry ¶
func (p PubSubPublish) ToEntry() (*timelinepb.CreateEventsRequest_EventEntry, error)
type TimelineFilter ¶
type TimelineFilter func(event *timelinepb.Event) bool
func FilterCall ¶
func FilterCall(filters []*timelinepb.GetTimelineRequest_CallFilter) TimelineFilter
FilterCall filters call events between the given modules.
Takes a list of filters, with each call event needing to match at least one filter.
func FilterDeployments ¶
func FilterDeployments(filters []*timelinepb.GetTimelineRequest_DeploymentFilter) TimelineFilter
func FilterIDRange ¶
func FilterIDRange(filter *timelinepb.GetTimelineRequest_IDFilter) TimelineFilter
FilterIDRange filters events between the given IDs, inclusive.
func FilterLogLevel ¶
func FilterLogLevel(f *timelinepb.GetTimelineRequest_LogLevelFilter) TimelineFilter
func FilterModule ¶
func FilterModule(filters []*timelinepb.GetTimelineRequest_ModuleFilter) TimelineFilter
func FilterRequests ¶
func FilterRequests(filters []*timelinepb.GetTimelineRequest_RequestFilter) TimelineFilter
func FilterTimeRange ¶
func FilterTimeRange(filter *timelinepb.GetTimelineRequest_TimeFilter) TimelineFilter
FilterTimeRange filters events between the given times, inclusive.
func FilterTypes ¶
func FilterTypes(filters ...*timelinepb.GetTimelineRequest_EventTypeFilter) TimelineFilter
Click to show internal directories.
Click to hide internal directories.