thrift

package
v0.0.0-...-eedcae6 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2015 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 Handler

type Handler struct {
	*proto.ServerInfo
	storage.Storage
	// contains filtered or unexported fields
}

Bar server thrift handler

func NewHandler

func NewHandler(ctx context.Context, info *proto.ServerInfo, stor storage.Storage) *Handler

func (*Handler) CreateUpload

func (h *Handler) CreateUpload(id []byte, manifests []*wire.Manifest, ttl int64) (r [][]byte, err error)

func (*Handler) FetchChunk

func (h *Handler) FetchChunk(blobID wire.ID, chunk *wire.Chunk) (r []byte, err error)

func (*Handler) FetchSpec

func (h *Handler) FetchSpec(id wire.ID) (r *wire.Spec, err error)

func (*Handler) FinishUpload

func (h *Handler) FinishUpload(uploadId []byte) (err error)

func (*Handler) GetInfo

func (h *Handler) GetInfo() (r *wire.ServerInfo, err error)

func (*Handler) GetManifests

func (h *Handler) GetManifests(ids [][]byte) (r []*wire.Manifest, err error)

func (*Handler) GetMissingBlobIds

func (h *Handler) GetMissingBlobIds(ids [][]byte) (r [][]byte, err error)

func (*Handler) RemoveTag

func (h *Handler) RemoveTag(ids [][]byte, tag []byte) (err error)

func (*Handler) SetTag

func (h *Handler) SetTag(ids [][]byte, tag []byte) (err error)

func (*Handler) UploadChunk

func (h *Handler) UploadChunk(uploadId []byte, chunkId wire.ID, body []byte) (err error)

func (*Handler) UploadSpec

func (h *Handler) UploadSpec(spec *wire.Spec) (err error)

type Options

type Options struct {
	Info *proto.ServerInfo
	Bind string
}

type ThriftServer

type ThriftServer struct {
	*Handler
	t_thrift.TServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(ctx context.Context, opts *Options, stor storage.Storage) (res *ThriftServer)

func (*ThriftServer) Start

func (s *ThriftServer) Start() (err error)

func (*ThriftServer) Stop

func (s *ThriftServer) Stop() (err error)

Jump to

Keyboard shortcuts

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