Documentation ¶
Index ¶
- Variables
- func CacheConfig() *service.ConfigSpec
- func ProcessorConfig() *service.ConfigSpec
- type Cache
- func (c *Cache) Add(ctx context.Context, key string, value []byte, ttl *time.Duration) error
- func (p Cache) Close(ctx context.Context) error
- func (c *Cache) Delete(ctx context.Context, key string) error
- func (c *Cache) Get(ctx context.Context, key string) (data []byte, err error)
- func (c *Cache) Set(ctx context.Context, key string, value []byte, ttl *time.Duration) error
- type Processor
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidOperation specified operation is not supported. ErrInvalidOperation = errors.New("invalid operation") // ErrContentRequired content field is required. ErrContentRequired = errors.New("content required") )
View Source
var ErrInvalidTranscoder = errors.New("invalid transcoder")
ErrInvalidTranscoder specified transcoder is not supported.
Functions ¶
func CacheConfig ¶
func CacheConfig() *service.ConfigSpec
CacheConfig export couchbase Cache specification.
func ProcessorConfig ¶
func ProcessorConfig() *service.ConfigSpec
ProcessorConfig export couchbase processor specification.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache stores or retrieves data from couchbase to be used as a cache
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor stores or retrieves data from couchbase for each message of a batch.
func NewProcessor ¶
NewProcessor returns a Couchbase processor.
func (*Processor) ProcessBatch ¶
func (p *Processor) ProcessBatch(ctx context.Context, inBatch service.MessageBatch) ([]service.MessageBatch, error)
ProcessBatch applies the processor to a message batch, either creating >0 resulting messages or a response to be sent back to the message source.
Click to show internal directories.
Click to hide internal directories.