Documentation
¶
Index ¶
- Constants
- Variables
- type AppendRequest
- type CloseRequest
- type Direction
- type Event
- type ListRequest
- type MemoryStore
- func (s *MemoryStore) Append(_ context.Context, req AppendRequest) (Event, error)
- func (s *MemoryStore) Close(_ context.Context, req CloseRequest) (Record, error)
- func (s *MemoryStore) Get(_ context.Context, streamID string) (Record, error)
- func (s *MemoryStore) List(_ context.Context, req ListRequest) ([]Record, error)
- func (s *MemoryStore) MarkPluginTransition(_ context.Context, req PluginTransitionRequest) ([]Record, error)
- func (s *MemoryStore) Peek(_ context.Context, req ReadRequest) (Record, []Event, error)
- func (s *MemoryStore) Read(_ context.Context, req ReadRequest) (Record, []Event, error)
- func (s *MemoryStore) Register(_ context.Context, req RegisterRequest) (Record, error)
- type PluginTransitionRequest
- type ReadRequest
- type Record
- type RegisterRequest
- type SQLiteStore
- func (s *SQLiteStore) Append(ctx context.Context, req AppendRequest) (Event, error)
- func (s *SQLiteStore) Close(ctx context.Context, req CloseRequest) (Record, error)
- func (s *SQLiteStore) CloseDatabase() error
- func (s *SQLiteStore) Get(ctx context.Context, streamID string) (Record, error)
- func (s *SQLiteStore) List(ctx context.Context, req ListRequest) ([]Record, error)
- func (s *SQLiteStore) MarkPluginTransition(ctx context.Context, req PluginTransitionRequest) ([]Record, error)
- func (s *SQLiteStore) Peek(ctx context.Context, req ReadRequest) (Record, []Event, error)
- func (s *SQLiteStore) Read(ctx context.Context, req ReadRequest) (Record, []Event, error)
- func (s *SQLiteStore) Register(ctx context.Context, req RegisterRequest) (Record, error)
- type Status
- type Store
Constants ¶
View Source
const DefaultMaxBufferedBytes int64 = 1 << 20
Variables ¶
View Source
var ( ErrNotFound = errors.New("plugin stream not found") ErrInvalidStream = errors.New("plugin stream is invalid") ErrAlreadyExists = errors.New("plugin stream already exists") ErrStreamClosed = errors.New("plugin stream is closed") ErrBackpressure = errors.New("plugin stream backpressure limit exceeded") )
Functions ¶
This section is empty.
Types ¶
type AppendRequest ¶
type CloseRequest ¶
type ListRequest ¶ added in v0.3.0
type ListRequest struct {
PluginInstanceID string `json:"plugin_instance_id,omitempty"`
}
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
func NewMemoryStore ¶
func NewMemoryStore() *MemoryStore
func (*MemoryStore) Append ¶
func (s *MemoryStore) Append(_ context.Context, req AppendRequest) (Event, error)
func (*MemoryStore) Close ¶
func (s *MemoryStore) Close(_ context.Context, req CloseRequest) (Record, error)
func (*MemoryStore) List ¶ added in v0.3.0
func (s *MemoryStore) List(_ context.Context, req ListRequest) ([]Record, error)
func (*MemoryStore) MarkPluginTransition ¶
func (s *MemoryStore) MarkPluginTransition(_ context.Context, req PluginTransitionRequest) ([]Record, error)
func (*MemoryStore) Peek ¶ added in v0.3.0
func (s *MemoryStore) Peek(_ context.Context, req ReadRequest) (Record, []Event, error)
func (*MemoryStore) Read ¶
func (s *MemoryStore) Read(_ context.Context, req ReadRequest) (Record, []Event, error)
func (*MemoryStore) Register ¶
func (s *MemoryStore) Register(_ context.Context, req RegisterRequest) (Record, error)
type PluginTransitionRequest ¶
type ReadRequest ¶
type Record ¶
type Record struct {
StreamID string `json:"stream_id"`
capability.ExecutionBinding
Direction Direction `json:"direction"`
Status Status `json:"status"`
Reason string `json:"reason,omitempty"`
ContentType string `json:"content_type,omitempty"`
MaxBufferedBytes int64 `json:"max_buffered_bytes,omitempty"`
BufferedBytes int64 `json:"buffered_bytes,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ClosedAt *time.Time `json:"closed_at,omitempty"`
}
type RegisterRequest ¶
type RegisterRequest struct {
StreamID string `json:"stream_id"`
ExecutionBinding capability.ExecutionBinding `json:"execution_binding"`
Direction Direction `json:"direction,omitempty"`
ContentType string `json:"content_type,omitempty"`
MaxBufferedBytes int64 `json:"max_buffered_bytes,omitempty"`
Now time.Time `json:"now,omitempty"`
}
type SQLiteStore ¶
type SQLiteStore struct {
// contains filtered or unexported fields
}
func NewSQLiteStore ¶
func NewSQLiteStore(ctx context.Context, path string) (*SQLiteStore, error)
func (*SQLiteStore) Append ¶
func (s *SQLiteStore) Append(ctx context.Context, req AppendRequest) (Event, error)
func (*SQLiteStore) Close ¶
func (s *SQLiteStore) Close(ctx context.Context, req CloseRequest) (Record, error)
func (*SQLiteStore) CloseDatabase ¶
func (s *SQLiteStore) CloseDatabase() error
func (*SQLiteStore) List ¶ added in v0.3.0
func (s *SQLiteStore) List(ctx context.Context, req ListRequest) ([]Record, error)
func (*SQLiteStore) MarkPluginTransition ¶
func (s *SQLiteStore) MarkPluginTransition(ctx context.Context, req PluginTransitionRequest) ([]Record, error)
func (*SQLiteStore) Peek ¶ added in v0.3.0
func (s *SQLiteStore) Peek(ctx context.Context, req ReadRequest) (Record, []Event, error)
func (*SQLiteStore) Read ¶
func (s *SQLiteStore) Read(ctx context.Context, req ReadRequest) (Record, []Event, error)
func (*SQLiteStore) Register ¶
func (s *SQLiteStore) Register(ctx context.Context, req RegisterRequest) (Record, error)
type Store ¶
type Store interface {
Register(ctx context.Context, req RegisterRequest) (Record, error)
List(ctx context.Context, req ListRequest) ([]Record, error)
Get(ctx context.Context, streamID string) (Record, error)
Append(ctx context.Context, req AppendRequest) (Event, error)
Peek(ctx context.Context, req ReadRequest) (Record, []Event, error)
Read(ctx context.Context, req ReadRequest) (Record, []Event, error)
Close(ctx context.Context, req CloseRequest) (Record, error)
MarkPluginTransition(ctx context.Context, req PluginTransitionRequest) ([]Record, error)
}
Click to show internal directories.
Click to hide internal directories.