pod

package
v0.0.0-...-b4bb62b Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnStatus

type ConnStatus struct {
	websocket.ConnStatus
	IsMaster bool
}

ConnStatus represents the status of a connection to a hub

type Opts

type Opts struct {
	Version             string
	Hubs                []service.Address
	WebsocketOpts       websocket.ServerOpts
	WebsocketClientOpts websocket.ClientOpts
	APIValidator        api.Validator
	GraphValidator      schema.Validator
	TopologyMarshallers api.TopologyMarshallers
	StatusReporter      api.StatusReporter
	TLSConfig           *tls.Config
	APIAuthBackend      shttp.AuthenticationBackend
	Logger              logging.Logger
}

Opts defines pod server options

type Pod

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

Pod describes a graph pod. It maintains a local graph in memory and forward any event to graph hubs

func NewPod

func NewPod(id string, serviceType service.Type, listen string, podEndpoint string, g *graph.Graph, opts Opts) (*Pod, error)

NewPod returns a new pod

func (*Pod) APIServer

func (p *Pod) APIServer() *api.Server

APIServer returns the pod API server

func (*Pod) ClientPool

func (p *Pod) ClientPool() *websocket.StructClientPool

ClientPool returns the WebSocket client pool

func (*Pod) Forwarder

func (p *Pod) Forwarder() *clients.Forwarder

Forwarder returns the pod topology forwarder

func (*Pod) GetStatus

func (p *Pod) GetStatus() interface{}

GetStatus returns the status of the pod

func (*Pod) GremlinTraversalParser

func (p *Pod) GremlinTraversalParser() *traversal.GremlinTraversalParser

GremlinTraversalParser returns the pod Gremlin traversal parser

func (*Pod) HTTPServer

func (p *Pod) HTTPServer() *shttp.Server

HTTPServer returns the pod HTTP server

func (*Pod) Start

func (p *Pod) Start() error

Start the pod

func (*Pod) Stop

func (p *Pod) Stop()

Stop the pod

func (*Pod) SubscriberServer

func (p *Pod) SubscriberServer() *websocket.StructServer

SubscriberServer returns the websocket server dedicated to subscribers

type Status

type Status struct {
	Subscribers map[string]websocket.ConnStatus
	Hubs        map[string]ConnStatus
}

Status describes the status of a pod

Jump to

Keyboard shortcuts

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