2023-04-22 08:58:14 +00:00
|
|
|
//go:build !solution
|
|
|
|
|
|
|
|
package gossip
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
2024-06-05 17:36:34 +00:00
|
|
|
"gitlab.com/slon/shad-go/gossip/meshpb"
|
|
|
|
"google.golang.org/grpc"
|
2023-04-22 08:58:14 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type PeerConfig struct {
|
|
|
|
SelfEndpoint string
|
|
|
|
PingPeriod time.Duration
|
|
|
|
}
|
|
|
|
|
|
|
|
type Peer struct {
|
|
|
|
config PeerConfig
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Peer) UpdateMeta(meta *meshpb.PeerMeta) {
|
|
|
|
panic("implement me")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Peer) AddSeed(seed string) {
|
|
|
|
panic("implement me")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Peer) Addr() string {
|
|
|
|
return p.config.SelfEndpoint
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Peer) GetMembers() map[string]*meshpb.PeerMeta {
|
|
|
|
panic("implement me")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Peer) Run() {
|
|
|
|
panic("implement me")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Peer) Stop() {
|
|
|
|
panic("implement me")
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewPeer(config PeerConfig) *Peer {
|
|
|
|
panic("implement me")
|
|
|
|
}
|