timelineclient

package
v0.420.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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

type Client

type Client struct {
	timelinepbconnect.TimelineServiceClient
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, endpoint *url.URL) *Client

func (*Client) Publish

func (c *Client) Publish(ctx context.Context, event Event)

Publish asynchronously enqueues an event for publication to the timeline.

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

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

type DeploymentUpdated

type DeploymentUpdated struct {
	DeploymentKey   model.DeploymentKey
	Time            time.Time
	MinReplicas     int
	PrevMinReplicas int
}

func (DeploymentUpdated) ToEntry

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

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

type Metrics

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

func (*Metrics) Failed

func (m *Metrics) Failed(ctx context.Context, count int)

func (*Metrics) Inserted

func (m *Metrics) Inserted(ctx context.Context, count int)

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

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

Jump to

Keyboard shortcuts

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