publisher

package
v0.0.0-...-e5457c4 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OracleRequestFormat

type OracleRequestFormat struct {
	TYPE   string
	SOURCE string
	VALUE  string
}

type Publisher

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

Chat server.

func NewPublisher

func NewPublisher() *Publisher

Create new chat server.

func (*Publisher) Add

func (p *Publisher) Add(s *Subscriber)

func (*Publisher) Done

func (p *Publisher) Done()

func (*Publisher) Listen

func (p *Publisher) Listen()

func (*Publisher) Serve

func (p *Publisher) Serve(w http.ResponseWriter, r *http.Request)

func (*Publisher) Status

func (p *Publisher) Status(w http.ResponseWriter, r *http.Request)

type RedisConfiguration

type RedisConfiguration struct {
	RedisHost  string
	RedisPort  string
	RedisDbNum int
}

type Request

type Request struct {
	OracleRequestFormat
	// contains filtered or unexported fields
}

func (*Request) String

func (r *Request) String() string

type Response

type Response struct {
	REQUEST  string
	RESPOSNE map[string]string
}

type Subscriber

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

Chat Subscriber.

func NewSubscriber

func NewSubscriber(conn *websocket.Conn, readCh chan *Request, closeCh chan string) *Subscriber

Create new chat Subscriber.

func (*Subscriber) Conn

func (s *Subscriber) Conn() *websocket.Conn

func (*Subscriber) Del

func (s *Subscriber) Del()

func (*Subscriber) Listen

func (s *Subscriber) Listen()

Listen Write and Read request via chanel

func (*Subscriber) Write

func (s *Subscriber) Write(r *Response)

Jump to

Keyboard shortcuts

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