Documentation ¶
Index ¶
- func CreateStream(c context.Context, name string, s *stream.Stream) (err error)
- func DeleteStream(c context.Context, name string) (err error)
- func GetStream(c context.Context, name string) (s *stream.Stream, err error)
- func ListStreams(c context.Context, pageNum, pageSize int) (s []*stream.Stream, err error)
- func StreamMiddleware(c context.Context, s StreamStore) context.Context
- func UpdateStream(c context.Context, name string, s *stream.Stream) (err error)
- type AlreadyExistsError
- type CorruptDataError
- type NoneFoundError
- type NotFoundError
- type StreamStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateStream ¶
CreateStream creates a stream using the store on the current context, it returns an error if the stream already exists.
func DeleteStream ¶
DeleteStream deletes the stream with the specific name using the current context store.
func GetStream ¶
GetStream returns the stream with the specific name using the current context store.
func ListStreams ¶
ListStreams lists pages streams from the current context store.
func StreamMiddleware ¶
func StreamMiddleware(c context.Context, s StreamStore) context.Context
StreamMiddleware appends the provided StreamStore to the request context.
Types ¶
type AlreadyExistsError ¶
AlreadyExistsError is returned when an Entity name is already taken.
func (*AlreadyExistsError) Error ¶
func (err *AlreadyExistsError) Error() string
Error message for AlreadyExistsError, implements error interface.
type CorruptDataError ¶
type CorruptDataError struct {
Kind string
}
CorruptDataError is returned when data at a key has invalid schema.
func (*CorruptDataError) Error ¶
func (err *CorruptDataError) Error() string
Error message for CorruptDataError, implements error interface.
type NoneFoundError ¶
type NoneFoundError struct {
Kind string
}
NoneFoundError is returned when a list request on a Kind returns no entities.
func (*NoneFoundError) Error ¶
func (err *NoneFoundError) Error() string
Error message for NoneFoundError, implements error interface.
type NotFoundError ¶
NotFoundError is returned when the requested Entity is not in the data store.
func (*NotFoundError) Error ¶
func (err *NotFoundError) Error() string
Error message for NotFoundErrors, implements error interface.
type StreamStore ¶
type StreamStore interface { CreateStream(name string, s *stream.Stream) (err error) GetStream(name string) (s *stream.Stream, err error) DeleteStream(name string) (err error) ListStreams(pageNum, pageSize int) (s []*stream.Stream, err error) UpdateStream(name string, s *stream.Stream) (err error) }
StreamStore defines the methods required to store and retrieve streams.