Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Center ¶
func (*Center) AddDistributor ¶
func (c *Center) AddDistributor(d *Distributor)
func (*Center) DelDistributor ¶
func (*Center) GetDistributors ¶ added in v1.0.0
func (c *Center) GetDistributors() map[any]*Distributor
type CenterManager ¶
func NewCenterManager ¶
func NewCenterManager() *CenterManager
func (*CenterManager) Destroy ¶
func (m *CenterManager) Destroy()
func (*CenterManager) PutCenter ¶
func (m *CenterManager) PutCenter(key any) (c *Center)
type CreateDistributionHandleFunc ¶
type CreateDistributionHandleFunc func(ctx context.Context, key any) Distribution
type Distribution ¶
type Distributor ¶ added in v1.0.0
type Distributor struct {
// contains filtered or unexported fields
}
func NewDistributor ¶ added in v1.0.0
func NewDistributor(ctx context.Context, key any, createDist CreateDistributionHandleFunc) *Distributor
func (*Distributor) Close ¶ added in v1.0.0
func (p *Distributor) Close() error
func (*Distributor) Push ¶ added in v1.0.0
func (p *Distributor) Push(data any) error
Push push data to the dispatcher, the dispatcher handles the data distribution.
type DistributorManager ¶
func NewDistributorManager ¶
func NewDistributorManager() *DistributorManager
func (*DistributorManager) Destroy ¶
func (m *DistributorManager) Destroy()
func (*DistributorManager) PutDistributor ¶
func (m *DistributorManager) PutDistributor(ctx context.Context, key any, distributionCreator CreateDistributionHandleFunc) (p *Distributor)
Click to show internal directories.
Click to hide internal directories.