Documentation
¶
Index ¶
- Constants
- type Config
- type Configurer
- type Informer
- type Plugin
- func (p *Plugin) Init(cfg Configurer, log *zap.Logger, server Server) error
- func (p *Plugin) MetricsCollector() []prometheus.Collector
- func (p *Plugin) Name() string
- func (p *Plugin) RPC() any
- func (p *Plugin) Reset() error
- func (p *Plugin) Serve() chan error
- func (p *Plugin) Stop() error
- func (p *Plugin) Workers() []*process.State
- type Pool
- type Proxy
- func (p *Proxy) Connect(ctx context.Context, request *centrifugov1.ConnectRequest) (*centrifugov1.ConnectResponse, error)
- func (p *Proxy) Publish(ctx context.Context, request *centrifugov1.PublishRequest) (*centrifugov1.PublishResponse, error)
- func (p *Proxy) RPC(ctx context.Context, request *centrifugov1.RPCRequest) (*centrifugov1.RPCResponse, error)
- func (p *Proxy) Refresh(ctx context.Context, request *centrifugov1.RefreshRequest) (*centrifugov1.RefreshResponse, error)
- func (p *Proxy) Subscribe(ctx context.Context, request *centrifugov1.SubscribeRequest) (*centrifugov1.SubscribeResponse, error)
- type Server
- type TLS
Constants ¶
View Source
const ( RRMode = "RR_MODE" RRModeCentrifuge = "centrifuge" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// host + port
ProxyAddress string `mapstructure:"proxy_address"`
// host + port
GrpcApiAddress string `mapstructure:"grpc_api_address"`
UseCompressor bool `mapstructure:"use_compressor"`
Version string `mapstructure:"version"`
Name string `mapstructure:"name"`
TLS *TLS `mapstructure:"tls"`
Pool *pool.Config `mapstructure:"pool"`
}
func (*Config) InitDefaults ¶
type Configurer ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) MetricsCollector ¶
func (p *Plugin) MetricsCollector() []prometheus.Collector
type Pool ¶
type Pool interface {
// Workers returns worker list associated with the pool.
Workers() (workers []*worker.Process)
// Exec payload
Exec(ctx context.Context, p *payload.Payload) (*payload.Payload, error)
// Reset kill all workers inside the watcher and replaces with new
Reset(ctx context.Context) error
// Destroy all underlying stack (but let them complete the task).
Destroy(ctx context.Context)
}
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
func (*Proxy) Connect ¶
func (p *Proxy) Connect(ctx context.Context, request *centrifugov1.ConnectRequest) (*centrifugov1.ConnectResponse, error)
func (*Proxy) Publish ¶
func (p *Proxy) Publish(ctx context.Context, request *centrifugov1.PublishRequest) (*centrifugov1.PublishResponse, error)
func (*Proxy) RPC ¶
func (p *Proxy) RPC(ctx context.Context, request *centrifugov1.RPCRequest) (*centrifugov1.RPCResponse, error)
func (*Proxy) Refresh ¶
func (p *Proxy) Refresh(ctx context.Context, request *centrifugov1.RefreshRequest) (*centrifugov1.RefreshResponse, error)
func (*Proxy) Subscribe ¶
func (p *Proxy) Subscribe(ctx context.Context, request *centrifugov1.SubscribeRequest) (*centrifugov1.SubscribeResponse, error)
Click to show internal directories.
Click to hide internal directories.