Documentation ¶
Index ¶
- Constants
- func GetEntityCodec() entityCodec
- type ConsumerType
- type Dao
- func (d *Dao) DelEntity(ctx context.Context, id string) error
- func (d *Dao) DelMapper(ctx context.Context, m *Mapper) error
- func (d *Dao) DelQueue(ctx context.Context, q *Queue) error
- func (d *Dao) GetEntity(ctx context.Context, id string) (en *Entity, err error)
- func (d *Dao) GetLastRevision(ctx context.Context) int64
- func (d *Dao) GetMapper(ctx context.Context, m *Mapper) (*Mapper, error)
- func (d *Dao) GetQueue(ctx context.Context, q *Queue) (*Queue, error)
- func (d *Dao) HasEntity(ctx context.Context, id string) (bool, error)
- func (d *Dao) HasMapper(ctx context.Context, m *Mapper) (bool, error)
- func (d *Dao) HasQueue(ctx context.Context, q *Queue) (bool, error)
- func (d *Dao) ListMapper(ctx context.Context, rev int64, req *ListMapperReq) ([]Mapper, error)
- func (d *Dao) PutEntity(ctx context.Context, en *Entity) error
- func (d *Dao) PutMapper(ctx context.Context, m *Mapper) error
- func (d *Dao) PutQueue(ctx context.Context, q *Queue) error
- func (d *Dao) RangeMapper(ctx context.Context, rev int64, handler MapperHandler)
- func (d *Dao) RangeQueue(ctx context.Context, rev int64, handler QueueHandler)
- func (d *Dao) WatchMapper(ctx context.Context, rev int64, handler WatchMapperHandler)
- func (d *Dao) WatchQueue(ctx context.Context, rev int64, handler WatchQueueHandler)
- type Entity
- type EnventType
- type IDao
- type ListMapperReq
- type Mapper
- type MapperHandler
- type Queue
- type QueueHandler
- type QueueType
- type WatchMapperHandler
- type WatchQueueHandler
Constants ¶
View Source
const ( // enumerate queue type. QueueTypeDapr QueueType = "dapr" QueueTypeKafkaTopic QueueType = "kafka.topic" QueueTypeKafkaPartition QueueType = "kafka.topic.partition" // enumerate consumer type. ConsumerTypeCore ConsumerType = "core" ConsumerTypeDispatch ConsumerType = "dispatcher" )
View Source
const EntityStorePrefix = "core.entity."
View Source
const (
// store mapper prefix key.
MapperPrefix = "CORE.MAPPER"
)
View Source
const (
// store queue prefix key.
QueuePrefix = "CORE.QUEUE"
)
Variables ¶
This section is empty.
Functions ¶
func GetEntityCodec ¶
func GetEntityCodec() entityCodec
Types ¶
type ConsumerType ¶
type ConsumerType string
func (ConsumerType) String ¶
func (ct ConsumerType) String() string
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
func (*Dao) ListMapper ¶
func (*Dao) RangeMapper ¶
func (d *Dao) RangeMapper(ctx context.Context, rev int64, handler MapperHandler)
func (*Dao) RangeQueue ¶
func (d *Dao) RangeQueue(ctx context.Context, rev int64, handler QueueHandler)
func (*Dao) WatchMapper ¶
func (d *Dao) WatchMapper(ctx context.Context, rev int64, handler WatchMapperHandler)
func (*Dao) WatchQueue ¶
func (d *Dao) WatchQueue(ctx context.Context, rev int64, handler WatchQueueHandler)
type Entity ¶
type Entity struct { ID string `json:"id" msgpack:"id" mapstructure:"id"` Type string `json:"type" msgpack:"type" mapstructure:"type"` Owner string `json:"owner" msgpack:"owner" mapstructure:"owner"` Source string `json:"source" msgpack:"source" mapstructure:"source"` Version int64 `json:"version" msgpack:"version" mapstructure:"version"` LastTime int64 `json:"last_time" msgpack:"last_time" mapstructure:"last_time"` TemplateID string `json:"template_id" msgpack:"template_id" mapstructure:"template_id"` Properties map[string]tdtl.Node `json:"-" msgpack:"-" mapstructure:"-"` ConfigBytes []byte `json:"-" msgpack:"config_bytes" mapstructure:"config_bytes"` PropertyBytes []byte `json:"property_bytes" msgpack:"property_bytes" mapstructure:"property_bytes"` }
type EnventType ¶
type EnventType mvccpb.Event_EventType
var ( PUT EnventType = EnventType(mvccpb.PUT) DELETE EnventType = EnventType(mvccpb.DELETE) )
func (EnventType) String ¶
func (et EnventType) String() string
type ListMapperReq ¶
type Mapper ¶
type MapperHandler ¶
type MapperHandler func([]Mapper)
type Queue ¶
type QueueHandler ¶
type QueueHandler func([]Queue)
type WatchMapperHandler ¶
type WatchMapperHandler func(EnventType, Mapper)
type WatchQueueHandler ¶
type WatchQueueHandler func(EnventType, Queue)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.