svrpool

package
v0.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServicePool

type ServicePool struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

ServicePool 服务池

func NewServicePool

func NewServicePool(ctx context.Context, pa, pb pool.Pool) *ServicePool

NewServicePool 创建服务池

func NewServicePoolWithRedis

func NewServicePoolWithRedis(ctx context.Context, rdscli *redis.Client, key string) *ServicePool

NewServicePoolWithRedis 创建服务池

func (*ServicePool) Pool

func (p *ServicePool) Pool() pool.Pool

Pool 获取当前服务池

func (*ServicePool) Switch

func (p *ServicePool) Switch()

Switch 切换服务池

func (*ServicePool) WithSetting

func (p *ServicePool) WithSetting(group, key string, autoReload time.Duration) error

WithSetting 从配置中加载服务

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL