go-libp2p-pubsub/mcache.go

30 lines
458 B
Go
Raw Normal View History

2018-02-19 16:13:18 +02:00
package floodsub
import (
pb "github.com/libp2p/go-floodsub/pb"
)
func NewMessageCache(gossip, history int) *MessageCache {
2018-02-19 16:13:18 +02:00
return &MessageCache{}
}
type MessageCache struct {
}
func (mc *MessageCache) Put(msg *pb.Message) {
2018-02-19 16:13:18 +02:00
// TODO
}
2018-02-19 18:45:10 +02:00
func (mc *MessageCache) Get(mid string) (*pb.Message, bool) {
// TODO
return nil, false
}
2018-02-20 12:08:18 +02:00
func (mc *MessageCache) GetGossipIDs(topic string) []string {
return nil
}
func (mc *MessageCache) Shift() {
// TODO
}