service

package
v0.0.0-...-f8c89ea Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2019 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TABLET_SIG_SYNC_INIT = iota
	TABLET_SIG_SYNC
)

Variables

This section is empty.

Functions

func LaunchService

func LaunchService(isUDPMulticast bool)

Types

type ProxyService

type ProxyService struct {
	ID         uint32    `gorm:"primary_key"`
	GlobalIp   string    `json:"global_ip,omitempty"`
	GlobalPort string    `json:"global_port,omitempty"`
	Latitude   float32   `json:"latitude,omitempty"`
	Longitude  float32   `json:"longtitude,omitempty"`
	CreatedAt  time.Time `json:"created_at,omitempty"`
	UpdatedAt  time.Time `json:"updated_at,omitempty"`
}

ProxyService has the same information pkg/tablet/model/proxy_entry.go

var ProxySvc *ProxyService

func (*ProxyService) ExchangeEntriesDriverRPC

func (p *ProxyService) ExchangeEntriesDriverRPC(ctx context.Context, in *proto.ExchangeEntriesRequest) (*proto.ExchangeEntriesResponse, error)

Called from other proxy to exchange peer inforamtion Actually,(proxyA) ExchangeEntriesStubRPC => (proxyB)ExchangeEntriesDriverRPC

func (*ProxyService) ExchangeEntriesStubRPC

func (p *ProxyService) ExchangeEntriesStubRPC(ctx context.Context, in *proto.ExchangeEntriesNotification) (*proto.Empty, error)

Called from Tablet server to exchange peer information with other proxy

func (*ProxyService) FetchPeersRPC

Fetch peer entires from in-memory hash table

func (*ProxyService) GeneratePeerID

func (*ProxyService) Heartbeat

func (p *ProxyService) Heartbeat(ctx context.Context, in *proto.Empty) (*proto.Empty, error)

func (*ProxyService) ListenUDPFromPeer

func (proxys *ProxyService) ListenUDPFromPeer(isMulticast bool)

func (*ProxyService) LookUpPeersRPC

Fetch peer entries by location query via Tablet server

Jump to

Keyboard shortcuts

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