Documentation ¶
Index ¶
- func NewMongoDB(logger logger.Logger) state.Store
- type Item
- type MongoDB
- func (m *MongoDB) Delete(ctx context.Context, req *state.DeleteRequest) error
- func (m *MongoDB) Features() []state.Feature
- func (m *MongoDB) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
- func (m *MongoDB) GetComponentMetadata() map[string]string
- func (m *MongoDB) Init(metadata state.Metadata) error
- func (m *MongoDB) Multi(ctx context.Context, request *state.TransactionalStateRequest) error
- func (m *MongoDB) Ping() error
- func (m *MongoDB) Query(ctx context.Context, req *state.QueryRequest) (*state.QueryResponse, error)
- func (m *MongoDB) Set(ctx context.Context, 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) Features ¶ added in v1.1.1
Features returns the features available in this state store.
func (*MongoDB) Get ¶
func (m *MongoDB) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
Get retrieves state from MongoDB with a key.
func (*MongoDB) GetComponentMetadata ¶ added in v1.10.1
func (*MongoDB) Multi ¶
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(ctx context.Context, req *state.QueryRequest) (*state.QueryResponse, error)
Query executes a query against store.
Click to show internal directories.
Click to hide internal directories.