eventing

package
v0.0.0-...-f613da9 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2016 License: Apache-2.0, BSD-3-Clause, MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NUM_VBUCKETS int = 1024
)

Variables

View Source
var FreeAppWorkerChanMap map[string]chan *Client
View Source
var NewAppWorkerChanMap map[string]chan *Worker

Functions

This section is empty.

Types

type Client

type Client struct {
	Feed *couchbase.DcpFeed
	// contains filtered or unexported fields
}

type Connection

type Connection struct {
	// contains filtered or unexported fields
}
type Header struct {
	Command    string `json:"command"`
	Subcommand string `json:"subcommand"`
	Metadata   string `json:"metadata"`
}

type Message

type Message struct {
	Header  Header
	Payload Payload
	ResChan chan *Response
}

type Payload

type Payload struct {
	Message string `json:"message"`
}

type Response

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

type Server

type Server struct {
	AppName           string
	ActiveWorkerCount uint32
	RunningWorkers    map[*Client]int
	ConnAcceptQueue   chan Connection

	// Keeps track of different stats of individual client workers
	// i.e. state of each worker("pending", "active"), start vbucket.
	// end vbucket etc
	WorkerStateMap map[int]map[string]interface{}

	WorkerShutdownChanMap map[int]chan bool

	StopAcceptChan chan bool
	StopServerChan chan bool
}

func (*Server) Serve

func (s *Server) Serve()

func (*Server) Setup

func (s *Server) Setup(workerCount int)

Setup initialises some bookeeping needed to track client workers associated with a specific upstream server

func (*Server) Stop

func (s *Server) Stop()

type Worker

type Worker struct {
	AppName string
	ID      WorkerID

	CmdWaitChan chan bool
	StopChan    chan bool
}

func (*Worker) Serve

func (w *Worker) Serve()

func (*Worker) Stop

func (w *Worker) Stop()

type WorkerID

type WorkerID int

Jump to

Keyboard shortcuts

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