Documentation ¶
Index ¶
- Constants
- func ListenAndServe(withTLS bool, certPath, addr string) error
- type Client
- func (c *Client) Ping(ctx context.Context) error
- func (c *Client) Receive(ctx context.Context, id uuid.UUID, resChan chan *pb.ReceiveResponse) error
- func (c *Client) ReceiveInit(ctx context.Context, id uuid.UUID) (string, int64, error)
- func (c *Client) Share(ctx context.Context, uid uuid.UUID, chunks chan *pb.ShareRequest) error
- func (c *Client) ShareInit(ctx context.Context, uid uuid.UUID, fileName string, fileSize int64) error
- type Server
- func (s *Server) Ping(ctx context.Context, _ *pb.PingMsg) (*pb.PongMsg, error)
- func (s *Server) Receive(req *pb.ReceiveRequest, receiver pb.GoShare_ReceiveServer) error
- func (s *Server) ReceiveInit(ctx context.Context, req *pb.ReceiveRequest) (*pb.ReceiveInitResponse, error)
- func (s *Server) Share(stream pb.GoShare_ShareServer) error
- func (s *Server) ShareInit(ctx context.Context, req *pb.ShareInitRequest) (*pb.ShareInitResponse, error)
Constants ¶
View Source
const MaxConcurrent = 20
Variables ¶
This section is empty.
Functions ¶
func ListenAndServe ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientLoadBalancer ¶
func (*Client) ReceiveInit ¶
type Server ¶
type Server struct { // contains filtered or unexported fields }
func (*Server) Receive ¶
func (s *Server) Receive(req *pb.ReceiveRequest, receiver pb.GoShare_ReceiveServer) error
func (*Server) ReceiveInit ¶
func (s *Server) ReceiveInit(ctx context.Context, req *pb.ReceiveRequest) (*pb.ReceiveInitResponse, error)
func (*Server) ShareInit ¶
func (s *Server) ShareInit(ctx context.Context, req *pb.ShareInitRequest) (*pb.ShareInitResponse, error)
Click to show internal directories.
Click to hide internal directories.