Documentation
¶
Index ¶
- type Locator
- type LocatorStore
- type Recorder
- type Store
- func (s *Store) CancelStream(_ context.Context, conversationID string) (<-chan struct{}, error)
- func (s *Store) Check(ctx context.Context, conversationIDs []string) ([]string, error)
- func (s *Store) HasResponseInProgress(_ context.Context, conversationID string) (bool, error)
- func (s *Store) RecorderWithAddress(ctx context.Context, conversationID string, advertisedAddress string) (*Recorder, error)
- func (s *Store) ReplayWithAddress(ctx context.Context, conversationID string, advertisedAddress string) (<-chan string, string, error)
- func (s *Store) RequestCancelWithAddress(ctx context.Context, conversationID string, advertisedAddress string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Locator ¶
Locator identifies which server owns the live response recording for a conversation.
func DecodeLocator ¶
func (Locator) MatchesAddress ¶
type LocatorStore ¶
type LocatorStore interface {
Available() bool
Get(ctx context.Context, conversationID string) (*Locator, error)
Upsert(ctx context.Context, conversationID string, locator Locator, ttl time.Duration) error
Remove(ctx context.Context, conversationID string) error
Exists(ctx context.Context, conversationID string) (bool, error)
}
LocatorStore stores and resolves response recorder ownership across service instances.
func NewLocatorStore ¶
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
Recorder writes response tokens to the active recording.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the response recorder backend implementation backed by local temp files.
func NewTempFileStore ¶
func NewTempFileStore(tempDir string, retention time.Duration, locatorStore LocatorStore) *Store
func (*Store) CancelStream ¶
func (*Store) HasResponseInProgress ¶
func (*Store) RecorderWithAddress ¶
func (*Store) ReplayWithAddress ¶
Click to show internal directories.
Click to hide internal directories.