Documentation ¶
Index ¶
Constants ¶
View Source
const ( ShardingByServiceIdLabel = "byServiceId" ServiceNamePatternPrefix = "services/{service}" )
View Source
const (
ShardingByNameLabel = "byName"
)
Variables ¶
This section is empty.
Functions ¶
func NewShardingByName ¶
func NewShardingByName(rings ...*sharding.RingConfig) *sharding.Decorator
NewShardingByName gives decorator which assigns shards based solely resource name. All ring configs must contain one FieldPath object with Label = "byName".
func NewShardingByNameAlg ¶
func NewShardingByServiceId ¶
func NewShardingByServiceId(rings ...*sharding.RingConfig) *sharding.Decorator
NewShardingByServiceId gives decorator which assigns shards based solely on service ID. All ring configs must contain one FieldPath object with Label = "byServiceId".
Types ¶
Click to show internal directories.
Click to hide internal directories.