Documentation
¶
Index ¶
- Constants
- Variables
- type AppendRequest
- type CloseRequest
- type Direction
- type Event
- 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) MarkPluginTransition(_ context.Context, req PluginTransitionRequest) ([]Record, 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) MarkPluginTransition(ctx context.Context, req PluginTransitionRequest) ([]Record, 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 ¶
Functions ¶
This section is empty.
Types ¶
type AppendRequest ¶
type CloseRequest ¶
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) MarkPluginTransition ¶
func (s *MemoryStore) MarkPluginTransition(_ context.Context, req PluginTransitionRequest) ([]Record, 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"`
PluginID string `json:"plugin_id"`
PluginInstanceID string `json:"plugin_instance_id"`
Method string `json:"method"`
Effect string `json:"effect,omitempty"`
Execution string `json:"execution"`
SurfaceInstanceID string `json:"surface_instance_id,omitempty"`
OwnerSessionHash string `json:"owner_session_hash,omitempty"`
OwnerUserHash string `json:"owner_user_hash,omitempty"`
SessionChannelIDHash string `json:"session_channel_id_hash,omitempty"`
BridgeChannelID string `json:"bridge_channel_id,omitempty"`
Direction Direction `json:"direction"`
Status Status `json:"status"`
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"`
PluginID string `json:"plugin_id"`
PluginInstanceID string `json:"plugin_instance_id"`
Method string `json:"method"`
Effect string `json:"effect,omitempty"`
Execution string `json:"execution"`
SurfaceInstanceID string `json:"surface_instance_id,omitempty"`
OwnerSessionHash string `json:"owner_session_hash,omitempty"`
OwnerUserHash string `json:"owner_user_hash,omitempty"`
SessionChannelIDHash string `json:"session_channel_id_hash,omitempty"`
BridgeChannelID string `json:"bridge_channel_id,omitempty"`
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) MarkPluginTransition ¶
func (s *SQLiteStore) MarkPluginTransition(ctx context.Context, req PluginTransitionRequest) ([]Record, 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)
Get(ctx context.Context, streamID string) (Record, error)
Append(ctx context.Context, req AppendRequest) (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.