Documentation ¶
Index ¶
- func GenerateSecret() (string, error)
- func MustNewTransformer(Secret string) encrypt.Transformer
- func NewTransformer(Secret string) (encrypt.Transformer, error)
- type ClientTest
- type Event
- type TimeStats
- type Work
- type WorkResult
- type WorkServer
- func (ws *WorkServer) Add(w *Work)
- func (ws *WorkServer) AddParams(params map[string]interface{}) *WorkServer
- func (ws *WorkServer) Event(event_id string, event *Event)
- func (ws *WorkServer) Get(Id string, AuthenticationKey string) (*Work, error)
- func (ws *WorkServer) NewHandler(event_id string, hf func(*Event, map[string]interface{})) error
- func (ws *WorkServer) QueueSize() int
- func (ws *WorkServer) Submit(w *Work)
- type Worker
- type WorkersStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSecret ¶
func MustNewTransformer ¶
func MustNewTransformer(Secret string) encrypt.Transformer
func NewTransformer ¶
func NewTransformer(Secret string) (encrypt.Transformer, error)
Types ¶
type ClientTest ¶
type Work ¶
type Work struct { Id bson.ObjectId `json:"-" bson:"_id"` IdHex string WorkJSON string Result *WorkResult Time *TimeStats }
func CreateWork ¶
type WorkResult ¶
type WorkServer ¶
type WorkServer struct { Queue *lane.Queue Handlers map[string]func(*Event, map[string]interface{}) HandlerParams map[string]interface{} Workers *WorkersStruct }
func MustNewServer ¶
func MustNewServer(Secret string) *WorkServer
func NewServer ¶
func NewServer(Secret string) (*WorkServer, error)
func NewServerInit ¶
func NewServerInit(Transformer encrypt.Transformer) *WorkServer
func (*WorkServer) Add ¶
func (ws *WorkServer) Add(w *Work)
func (*WorkServer) AddParams ¶
func (ws *WorkServer) AddParams(params map[string]interface{}) *WorkServer
func (*WorkServer) Event ¶
func (ws *WorkServer) Event(event_id string, event *Event)
func (*WorkServer) Get ¶
func (ws *WorkServer) Get(Id string, AuthenticationKey string) (*Work, error)
func (*WorkServer) NewHandler ¶
func (ws *WorkServer) NewHandler(event_id string, hf func(*Event, map[string]interface{})) error
func (*WorkServer) QueueSize ¶
func (ws *WorkServer) QueueSize() int
func (*WorkServer) Submit ¶
func (ws *WorkServer) Submit(w *Work)
type Worker ¶
type Worker struct { Id int Registered bool Transformer encrypt.Transformer SessionAuthenticationKey string Verification *ClientTest }
func (*Worker) SetAuthenticationKey ¶
type WorkersStruct ¶
type WorkersStruct struct { Members map[int]*Worker Transformer encrypt.Transformer WorkerCount int }
func (*WorkersStruct) Register ¶
func (wrs *WorkersStruct) Register(ws *WorkServer) (string, string)
func (*WorkersStruct) Verify ¶
func (wrs *WorkersStruct) Verify(ws *WorkServer, Id string, Response string) (string, error)
Click to show internal directories.
Click to hide internal directories.