Documentation
¶
Index ¶
- Constants
- func LaunchService(isUDPMulticast bool)
- type ProxyService
- func (p *ProxyService) ExchangeEntriesDriverRPC(ctx context.Context, in *proto.ExchangeEntriesRequest) (*proto.ExchangeEntriesResponse, error)
- func (p *ProxyService) ExchangeEntriesStubRPC(ctx context.Context, in *proto.ExchangeEntriesNotification) (*proto.Empty, error)
- func (p *ProxyService) FetchPeersRPC(ctx context.Context, in *proto.FetchPeersRequest) (*proto.FetchPeersResponse, error)
- func (p *ProxyService) GeneratePeerID(ctx context.Context, in *proto.GeneratePeerIDRequest) (*proto.GeneratePeerIDResponse, error)
- func (p *ProxyService) Heartbeat(ctx context.Context, in *proto.Empty) (*proto.Empty, error)
- func (proxys *ProxyService) ListenUDPFromPeer(isMulticast bool)
- func (p *ProxyService) LookUpPeersRPC(ctx context.Context, in *proto.LookUpPeerRequest) (*proto.LookUpPeerResponse, error)
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 ¶
func (p *ProxyService) FetchPeersRPC(ctx context.Context, in *proto.FetchPeersRequest) (*proto.FetchPeersResponse, error)
Fetch peer entires from in-memory hash table
func (*ProxyService) GeneratePeerID ¶
func (p *ProxyService) GeneratePeerID(ctx context.Context, in *proto.GeneratePeerIDRequest) (*proto.GeneratePeerIDResponse, error)
func (*ProxyService) ListenUDPFromPeer ¶
func (proxys *ProxyService) ListenUDPFromPeer(isMulticast bool)
func (*ProxyService) LookUpPeersRPC ¶
func (p *ProxyService) LookUpPeersRPC(ctx context.Context, in *proto.LookUpPeerRequest) (*proto.LookUpPeerResponse, error)
Fetch peer entries by location query via Tablet server
Click to show internal directories.
Click to hide internal directories.