transport

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: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RPCClient

type RPCClient struct {
	// contains filtered or unexported fields
}

func (*RPCClient) Call

func (c *RPCClient) Call(serviceMethod string, args interface{}, reply interface{}) (err error)

func (*RPCClient) Close

func (c *RPCClient) Close()

func (*RPCClient) Connect

func (c *RPCClient) Connect() (err error)

func (*RPCClient) Release

func (c *RPCClient) Release()

type RPCPool

type RPCPool struct {
	*pools.ResourcePool
	// contains filtered or unexported fields
}

func NewRPCPool

func NewRPCPool(n int, ttl time.Duration,
	endpoint string, rpcEndpoints []string) (res *RPCPool)

func (*RPCPool) Take

func (p *RPCPool) Take() (res *RPCClient, err error)

type TClient

type TClient struct {
	*wire.BarClient
	// contains filtered or unexported fields
}

Bar thrift client wrapper

func (*TClient) Close

func (c *TClient) Close()

func (*TClient) Connect

func (c *TClient) Connect() (err error)

func (*TClient) Release

func (c *TClient) Release()

type TPool

type TPool struct {
	*pools.ResourcePool
	// contains filtered or unexported fields
}

func NewTPool

func NewTPool(endpoints []string, bufferSize int, n int, ttl time.Duration) (res *TPool)

func (*TPool) Take

func (p *TPool) Take() (res *TClient, err error)

type Transport

type Transport struct {
	*concurrency.BatchPool
	// contains filtered or unexported fields
}

Common transport with pooled connections

func NewTransport

func NewTransport(mod *model.Model, endpoint string, rpcEndpoints string, n int) (res *Transport)

New RPC pool with default endpoint

func (*Transport) Check

func (t *Transport) Check(ids []proto.ID) (res []proto.ID, err error)

func (*Transport) Close

func (t *Transport) Close()

func (*Transport) Download

func (t *Transport) Download(blobs lists.BlobMap) (err error)

func (*Transport) GetManifests

func (t *Transport) GetManifests(ids []proto.ID) (res []proto.Manifest, err error)

func (*Transport) GetSpec

func (t *Transport) GetSpec(id proto.ID) (res proto.Spec, err error)

func (*Transport) ServerInfo

func (t *Transport) ServerInfo() (res proto.ServerInfo, err error)

func (*Transport) Upload

func (t *Transport) Upload(blobs lists.BlobMap) (err error)

Upload blobs

func (*Transport) UploadSpec

func (t *Transport) UploadSpec(spec proto.Spec) (err error)

type Upload

type Upload struct {
	*Transport
	*uuid.UUID
	// contains filtered or unexported fields
}

func NewUpload

func NewUpload(t *Transport, ttl time.Duration) (res *Upload)

func (*Upload) Commit

func (u *Upload) Commit() (err error)

func (*Upload) SendCreateUpload

func (u *Upload) SendCreateUpload(links lists.BlobMap) (missing []proto.ID, err error)

func (*Upload) UploadChunk

func (u *Upload) UploadChunk(name string, chunk proto.Chunk) (err error)

Jump to

Keyboard shortcuts

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