server

package
v0.0.0-...-bb98047 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Port      int
	File      io.Reader
	ChunkSize int

	Filename string

	proto.UnimplementedMerkleServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(c context.Context, port int, file io.Reader, chunkSize int, filename string) *Server

func (*Server) GetMetadata

func (s *Server) GetMetadata(context.Context, *proto.Empty) (*proto.Metadata, error)

GetMetedata gets the file's metadata

func (*Server) GetPart

func (s *Server) GetPart(ctx context.Context, in *proto.PartRequest) (*proto.Part, error)

GetPart returns a given part

func (*Server) Start

func (s *Server) Start()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL