Documentation ¶
Index ¶
- func NewMongoDB(logger logger.Logger) state.Store
- type Item
- type MongoDB
- func (m *MongoDB) Delete(req *state.DeleteRequest) error
- func (m *MongoDB) Features() []state.Feature
- func (m *MongoDB) Get(req *state.GetRequest) (*state.GetResponse, error)
- func (m *MongoDB) Init(metadata state.Metadata) error
- func (m *MongoDB) Multi(request *state.TransactionalStateRequest) error
- func (m *MongoDB) Ping() error
- func (m *MongoDB) Query(req *state.QueryRequest) (*state.QueryResponse, error)
- func (m *MongoDB) Set(req *state.SetRequest) error
- type Query
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Item ¶
type Item struct { Key string `bson:"_id"` Value interface{} `bson:"value"` Etag string `bson:"_etag"` }
Item is Mongodb document wrapper.
type MongoDB ¶
type MongoDB struct { state.DefaultBulkStore // contains filtered or unexported fields }
MongoDB is a state store implementation for MongoDB.
func (*MongoDB) Delete ¶
func (m *MongoDB) Delete(req *state.DeleteRequest) error
Delete performs a delete operation.
func (*MongoDB) Features ¶ added in v1.1.1
Features returns the features available in this state store.
func (*MongoDB) Get ¶
func (m *MongoDB) Get(req *state.GetRequest) (*state.GetResponse, error)
Get retrieves state from MongoDB with a key.
func (*MongoDB) Multi ¶
func (m *MongoDB) Multi(request *state.TransactionalStateRequest) error
Multi performs a transactional operation. succeeds only if all operations succeed, and fails if one or more operations fail.
func (*MongoDB) Query ¶ added in v1.5.0
func (m *MongoDB) Query(req *state.QueryRequest) (*state.QueryResponse, error)
Query executes a query against store.
Click to show internal directories.
Click to hide internal directories.