service

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2021 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MemCache = cache.NewMemCache("dht", 0, 0)

Functions

This section is empty.

Types

type ChainAppService

type ChainAppService struct {
	PeerEntityService
	Mutex sync.Mutex
}

* 同步表结构,服务继承基本服务的方法

func GetChainAppService

func GetChainAppService() *ChainAppService

func (*ChainAppService) GetFromCache

func (this *ChainAppService) GetFromCache(peerId string) *entity.ChainApp

func (*ChainAppService) GetSeqName

func (this *ChainAppService) GetSeqName() string

func (*ChainAppService) GetValue

func (this *ChainAppService) GetValue(peerId string) (*entity.ChainApp, error)

func (*ChainAppService) NewEntities

func (this *ChainAppService) NewEntities(data []byte) (interface{}, error)

func (*ChainAppService) NewEntity

func (this *ChainAppService) NewEntity(data []byte) (interface{}, error)

func (*ChainAppService) PutValue

func (this *ChainAppService) PutValue(chainApp *entity.ChainApp) error

type MyselfPeerService

type MyselfPeerService struct {
	PeerEntityService
	Mutex sync.Mutex
}

* 同步表结构,服务继承基本服务的方法

func GetMyselfPeerService

func GetMyselfPeerService() *MyselfPeerService

func (*MyselfPeerService) GetFromCache

func (this *MyselfPeerService) GetFromCache(refreshs ...bool) *entity.MyselfPeer

func (*MyselfPeerService) GetSeqName

func (this *MyselfPeerService) GetSeqName() string

func (*MyselfPeerService) NewEntities

func (this *MyselfPeerService) NewEntities(data []byte) (interface{}, error)

func (*MyselfPeerService) NewEntity

func (this *MyselfPeerService) NewEntity(data []byte) (interface{}, error)

type PeerClientService

type PeerClientService struct {
	PeerEntityService
	Mutex sync.Mutex
}

* 同步表结构,服务继承基本服务的方法

func GetPeerClientService

func GetPeerClientService() *PeerClientService

func (*PeerClientService) GetFromCache

func (this *PeerClientService) GetFromCache(peerId string) *entity.PeerClient

func (*PeerClientService) GetLocals

func (this *PeerClientService) GetLocals(key string, clientId string) ([]*entity.PeerClient, error)

func (*PeerClientService) GetSeqName

func (this *PeerClientService) GetSeqName() string

func (*PeerClientService) GetValues

func (this *PeerClientService) GetValues(peerId string, mobile string) ([]*entity.PeerClient, error)

func (*PeerClientService) NewEntities

func (this *PeerClientService) NewEntities(data []byte) (interface{}, error)

func (*PeerClientService) NewEntity

func (this *PeerClientService) NewEntity(data []byte) (interface{}, error)

func (*PeerClientService) PutLocals

func (this *PeerClientService) PutLocals(peerClients []*entity.PeerClient) error

func (*PeerClientService) PutValue

func (this *PeerClientService) PutValue(peerClient *entity.PeerClient, keyKind string) error

func (*PeerClientService) PutValues

func (this *PeerClientService) PutValues(peerClient *entity.PeerClient) error

func (*PeerClientService) Validate

func (this *PeerClientService) Validate(peerClient *entity.PeerClient) error

type PeerEndpointService

type PeerEndpointService struct {
	PeerEntityService
	Mutex sync.Mutex
}

* 同步表结构,服务继承基本服务的方法

func GetPeerEndpointService

func GetPeerEndpointService() *PeerEndpointService

func (*PeerEndpointService) FindPeer

func (this *PeerEndpointService) FindPeer(peerId string) (string, error)

func (*PeerEndpointService) GetFromCache

func (this *PeerEndpointService) GetFromCache(peerId string) *entity.PeerEndpoint

func (*PeerEndpointService) GetLocal

func (this *PeerEndpointService) GetLocal(peerId string) ([]*entity.PeerEndpoint, error)

func (*PeerEndpointService) GetRand

func (this *PeerEndpointService) GetRand(seed int64) []*entity.PeerEndpoint

func (*PeerEndpointService) GetSeqName

func (this *PeerEndpointService) GetSeqName() string

func (*PeerEndpointService) GetValue

func (this *PeerEndpointService) GetValue(peerId string) (*entity.PeerEndpoint, error)

func (*PeerEndpointService) NewEntities

func (this *PeerEndpointService) NewEntities(data []byte) (interface{}, error)

func (*PeerEndpointService) NewEntity

func (this *PeerEndpointService) NewEntity(data []byte) (interface{}, error)

func (*PeerEndpointService) PutLocal

func (this *PeerEndpointService) PutLocal(peerEndpoint *entity.PeerEndpoint) error

func (*PeerEndpointService) PutValue

func (this *PeerEndpointService) PutValue(peerEndpoint *entity.PeerEndpoint) error

type PeerEntityService

type PeerEntityService struct {
	service.OrmBaseService
}

* 同步表结构,服务继承基本服务的方法

func GetPeerEntityService

func GetPeerEntityService() *PeerEntityService

func (*PeerEntityService) GetSeqName

func (this *PeerEntityService) GetSeqName() string

Jump to

Keyboard shortcuts

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