etv3

package
v1.5.7 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAILBOX_DIR     = "mailbox/"
	MAILBOX_TL_TIME = 20 * 60
)
View Source
const (
	STUB_DIR      = "stub/"
	STUB_TTL_TIME = 30
)
View Source
const (
	ETCD_DIR = "server/"
)

Variables

This section is empty.

Functions

func NodeToService

func NodeToService(val []byte) *common.ClusterInfo

Types

type MailBox

type MailBox struct {
	*common.ClusterInfo
	// contains filtered or unexported fields
}

publish

func (*MailBox) Create

func (m *MailBox) Create(info *rpc.MailBox) bool

func (*MailBox) Delete

func (m *MailBox) Delete(Id int64) error

func (*MailBox) DeleteAll

func (m *MailBox) DeleteAll() error

func (*MailBox) Get

func (m *MailBox) Get(Id int64) *rpc.MailBox

func (*MailBox) Init

func (m *MailBox) Init(endpoints []string, info *common.ClusterInfo)

初始化pub

func (*MailBox) Lease

func (m *MailBox) Lease(leaseId int64) error

func (*MailBox) Run

func (m *MailBox) Run()

subscribe

func (*MailBox) Start

func (m *MailBox) Start()

type Master

type Master struct {
	common.IClusterInfo
	// contains filtered or unexported fields
}

监控服务器

func (*Master) Init

func (m *Master) Init(info common.IClusterInfo, Endpoints []string)

监控服务器

func (*Master) InitServices

func (m *Master) InitServices()

func (*Master) Run

func (m *Master) Run()

func (*Master) Start

func (m *Master) Start()

type STATUS

type STATUS uint32
const (
	SET STATUS = iota
	TTL STATUS = iota
)

type Service

type Service struct {
	*common.ClusterInfo
	// contains filtered or unexported fields
}

注册服务器

func (*Service) Init

func (s *Service) Init(info *common.ClusterInfo, endpoints []string)

注册服务器

func (*Service) Run

func (s *Service) Run()

func (*Service) SET

func (s *Service) SET()

func (*Service) Start

func (s *Service) Start()

func (*Service) TTL

func (s *Service) TTL()

type Snowflake

type Snowflake struct {
	// contains filtered or unexported fields
}

func (*Snowflake) Init

func (s *Snowflake) Init(endpoints []string)

uuid生成器

func (*Snowflake) Key

func (s *Snowflake) Key() string

func (*Snowflake) Run

func (s *Snowflake) Run()

func (*Snowflake) SET

func (s *Snowflake) SET() bool

func (*Snowflake) Start

func (s *Snowflake) Start()

func (*Snowflake) TTL

func (s *Snowflake) TTL()

type StubMailBox

type StubMailBox struct {
	*common.ClusterInfo
	// contains filtered or unexported fields
}

publish

func (*StubMailBox) Count

func (s *StubMailBox) Count(stubType rpc.STUB) int64

func (*StubMailBox) Create

func (s *StubMailBox) Create(info *common.StubMailBox) bool

func (*StubMailBox) Get

func (s *StubMailBox) Get(stubType rpc.STUB, Id int64) *common.StubMailBox

func (*StubMailBox) Init

func (s *StubMailBox) Init(endpoints []string, info *common.ClusterInfo)

初始化pub

func (*StubMailBox) Lease

func (s *StubMailBox) Lease(info *common.StubMailBox) error

func (*StubMailBox) Run

func (s *StubMailBox) Run()

subscribe

func (*StubMailBox) Start

func (s *StubMailBox) Start()

type StubMailBoxMap

type StubMailBoxMap map[int64]*common.StubMailBox

publish

Jump to

Keyboard shortcuts

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