Versions in this module Expand all Collapse all v0 v0.0.4 Feb 7, 2020 Changes in this version + type ChannelService struct + P2p interfaces.P2p + Storage interfaces.Storage + func (s *ChannelService) GetAllChannels(ctx context.Context, in *pb.Empty) (*pb.ChannelList, error) + func (s *ChannelService) GetChannel(ctx context.Context, in *pb.ChannelSpecificRequest) (*pb.Channel, error) + func (s *ChannelService) Join(ctx context.Context, in *pb.JoinRequest) (*pb.JoinResponse, error) + func (s *ChannelService) Leave(ctx context.Context, in *pb.ChannelSpecificRequest) (*pb.Empty, error) + func (s *ChannelService) RegisterP2p(p2p interfaces.P2p) + func (s *ChannelService) RegisterStorage(storage interfaces.Storage) + type NodeService struct + P2p interfaces.P2p + func (s *NodeService) BlacklistPeer(ctx context.Context, in *pb.Peer) (*pb.Empty, error) + func (s *NodeService) GetAllPeers(ctx context.Context, in *pb.Empty) (*pb.PeerListResponse, error) + func (s *NodeService) RegisterP2p(p2p interfaces.P2p) + type OrderService struct + Logger interfaces.Logger + P2p interfaces.P2p + Storage interfaces.Storage + func (s *OrderService) Create(ctx context.Context, in *pb.CreateRequest) (*pb.CreateResponse, error) + func (s *OrderService) Delete(ctx context.Context, in *pb.OrderSpecificRequest) (*pb.Empty, error) + func (s *OrderService) GetAllOrders(ctx context.Context, in *pb.Empty) (*pb.OrderList, error) + func (s *OrderService) GetOrder(ctx context.Context, in *pb.OrderSpecificRequest) (*pb.Order, error) + func (s *OrderService) GetSyncState() SyncState + func (s *OrderService) Lock(ctx context.Context, in *pb.OrderSpecificRequest) (*pb.Empty, error) + func (s *OrderService) Receive(buf []byte, from peer.ID) error + func (s *OrderService) RegisterP2p(p2p interfaces.P2p) + func (s *OrderService) RegisterStorage(storage interfaces.Storage) + func (s *OrderService) RegisterWebsocket(websocket interfaces.WebsocketService) + func (s *OrderService) SetSyncState(syncState SyncState) + func (s *OrderService) Unlock(ctx context.Context, in *pb.OrderSpecificRequest) (*pb.Empty, error) + type Server struct + Channels *ChannelService + Logger interfaces.Logger + Orders *OrderService + func NewServer(log interfaces.Logger, storage interfaces.Storage, p2p interfaces.P2p, ...) *Server + func (server *Server) Close() + func (server *Server) Run(port uint) + type SyncState int + const OutOfDate + const UpToDate + type WebsocketService struct + Connections []*websocket.Conn + Logger interfaces.Logger + Port uint + func (ws *WebsocketService) Close() + func (ws *WebsocketService) PushToWebsockets(message *pb.WireMessage) + func (ws *WebsocketService) Start()