Documentation ¶
Index ¶
- Constants
- type Config
- type Plugin
- func (p *Plugin) Available()
- func (p *Plugin) Collects() []interface{}
- func (p *Plugin) GetPublishers(name endure.Named, pub pubsub.PSProvider)
- func (p *Plugin) Init(cfg config.Configurer, log logger.Logger, server server.Server) error
- func (p *Plugin) Middleware(next http.Handler) http.Handler
- func (p *Plugin) Name() string
- func (p *Plugin) Publish(m []byte) error
- func (p *Plugin) PublishAsync(m []byte)
- func (p *Plugin) RPC() interface{}
- func (p *Plugin) Reset() error
- func (p *Plugin) Serve() chan error
- func (p *Plugin) Stop() error
- func (p *Plugin) Workers() []process.State
- type RedisConfig
Constants ¶
View Source
const (
PluginName string = "websockets"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // http path for the websocket Path string `mapstructure:"path"` // ["redis", "amqp", "memory"] PubSubs []string `mapstructure:"pubsubs"` Middleware []string `mapstructure:"middleware"` AllowedOrigin string `mapstructure:"allowed_origin"` Redis *RedisConfig `mapstructure:"redis"` Pool *pool.Config `mapstructure:"pool"` // contains filtered or unexported fields }
Config represents configuration for the ws plugin
func (*Config) InitDefault ¶
func (c *Config) InitDefault()
InitDefault initialize default values for the ws config
type Plugin ¶
func (*Plugin) GetPublishers ¶
func (p *Plugin) GetPublishers(name endure.Named, pub pubsub.PSProvider)
GetPublishers collects all pubsubs
func (*Plugin) PublishAsync ¶
type RedisConfig ¶
type RedisConfig struct { Addrs []string `mapstructure:"addrs"` DB int `mapstructure:"db"` Username string `mapstructure:"username"` Password string `mapstructure:"password"` MasterName string `mapstructure:"master_name"` SentinelPassword string `mapstructure:"sentinel_password"` RouteByLatency bool `mapstructure:"route_by_latency"` RouteRandomly bool `mapstructure:"route_randomly"` MaxRetries int `mapstructure:"max_retries"` DialTimeout time.Duration `mapstructure:"dial_timeout"` MinRetryBackoff time.Duration `mapstructure:"min_retry_backoff"` MaxRetryBackoff time.Duration `mapstructure:"max_retry_backoff"` PoolSize int `mapstructure:"pool_size"` MinIdleConns int `mapstructure:"min_idle_conns"` MaxConnAge time.Duration `mapstructure:"max_conn_age"` ReadTimeout time.Duration `mapstructure:"read_timeout"` WriteTimeout time.Duration `mapstructure:"write_timeout"` PoolTimeout time.Duration `mapstructure:"pool_timeout"` IdleTimeout time.Duration `mapstructure:"idle_timeout"` IdleCheckFreq time.Duration `mapstructure:"idle_check_freq"` ReadOnly bool `mapstructure:"read_only"` }
Click to show internal directories.
Click to hide internal directories.