registry

package
v0.0.0-...-3f995bb Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2016 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBInsert

type DBInsert struct {
	Table string
	Data  *map[string]interface{}
}

type FileProcessor

type FileProcessor interface {
	Process(name string, files map[string][]byte) ([]DBInsert, error)
}

files: map of filetype -> file

type PullClient

type PullClient struct {
	Type  string
	Conn  *r.Session
	Table string
}

func InitPullClient

func InitPullClient(cluster []string, db string, table string) *PullClient

func (*PullClient) Pull

func (c *PullClient) Pull(name string) map[string]interface{}

type PushClient

type PushClient struct {
	ServerAddr string
	ChunkSize  int
	Conn       pb.RegistryClient
}

func InitPushClient

func InitPushClient(serveraddr string, chunksize int) *PushClient

func (*PushClient) Push

func (c *PushClient) Push(name string, files ...PushClientFile)

type PushClientFile

type PushClientFile struct {
	Name string
	Type string
}

type PushServer

type PushServer struct {
	Port      int
	ChunkSize int
	Conn      *r.Session // sessions are thread safe?
	Processor FileProcessor
}

func InitPushServer

func InitPushServer(cluster []string, db string, proc FileProcessor, port, chunksize int, tables ...string) *PushServer

TODO add authKey argument to creating the session

func (*PushServer) Push

func (s *PushServer) Push(stream pb.Registry_PushServer) error

func (*PushServer) Run

func (s *PushServer) Run()

Directories

Path Synopsis
Package regproto is a generated protocol buffer package.
Package regproto is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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