Documentation ¶
Index ¶
- type Client
- func (c *Client) Destroy()
- func (c *Client) SendAppend(host string, kgname fred.KeygroupName, id string, value string) error
- func (c *Client) SendCreateKeygroup(host string, kgname fred.KeygroupName, expiry int) error
- func (c *Client) SendDeleteKeygroup(host string, kgname fred.KeygroupName) error
- func (c *Client) SendGetAllItems(host string, kgname fred.KeygroupName) ([]fred.Item, error)
- func (c *Client) SendGetItem(host string, kgname fred.KeygroupName, id string) ([]fred.Item, error)
- func (c *Client) SendUpdate(host string, kgname fred.KeygroupName, id string, value string, ...) error
- type Server
- func (s *Server) AppendItem(_ context.Context, request *peering.AppendItemRequest) (*peering.Empty, error)
- func (s *Server) Close() error
- func (s *Server) CreateKeygroup(_ context.Context, request *peering.CreateKeygroupRequest) (*peering.Empty, error)
- func (s *Server) DeleteKeygroup(_ context.Context, request *peering.DeleteKeygroupRequest) (*peering.Empty, error)
- func (s *Server) GetAllItems(_ context.Context, request *peering.GetAllItemsRequest) (*peering.GetAllItemsResponse, error)
- func (s *Server) GetItem(_ context.Context, request *peering.GetItemRequest) (*peering.GetItemResponse, error)
- func (s *Server) PutItem(ctx context.Context, request *peering.PutItemRequest) (*peering.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an peering client to communicate with peers.
func (*Client) Destroy ¶
func (c *Client) Destroy()
Destroy currently does nothing, but might delete open connections if they are implemented
func (*Client) SendAppend ¶
SendAppend sends this command to the server at this address
func (*Client) SendCreateKeygroup ¶
SendCreateKeygroup sends this command to the server at this address
func (*Client) SendDeleteKeygroup ¶
func (c *Client) SendDeleteKeygroup(host string, kgname fred.KeygroupName) error
SendDeleteKeygroup sends this command to the server at this address
func (*Client) SendGetAllItems ¶
SendGetAllItems sends this command to the server at this address
func (*Client) SendGetItem ¶
SendGetItem sends this command to the server at this address
type Server ¶
Server is a grpc server that let's peers access the internal handler.
func NewServer ¶
func NewServer(host string, handler *fred.IntHandler, certFile string, keyFile string, caFile string) *Server
NewServer creates a new Server for communication to the inthandler from other nodes
func (*Server) AppendItem ¶
func (s *Server) AppendItem(_ context.Context, request *peering.AppendItemRequest) (*peering.Empty, error)
AppendItem calls HandleAppend on the Inthandler
func (*Server) CreateKeygroup ¶
func (s *Server) CreateKeygroup(_ context.Context, request *peering.CreateKeygroupRequest) (*peering.Empty, error)
CreateKeygroup calls this Method on the Inthandler
func (*Server) DeleteKeygroup ¶
func (s *Server) DeleteKeygroup(_ context.Context, request *peering.DeleteKeygroupRequest) (*peering.Empty, error)
DeleteKeygroup calls this Method on the Inthandler
func (*Server) GetAllItems ¶
func (s *Server) GetAllItems(_ context.Context, request *peering.GetAllItemsRequest) (*peering.GetAllItemsResponse, error)
GetAllItems has no implementation
func (*Server) GetItem ¶
func (s *Server) GetItem(_ context.Context, request *peering.GetItemRequest) (*peering.GetItemResponse, error)
GetItem has no implementation