signal

package
v0.0.0-...-6af2dc9 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(config *configure.Config)

Types

type Client

type Client interface {
	Messages() <-chan types.Message
	Done() <-chan struct{}
	Write(msg types.Message) error
}

func NewClient

func NewClient(ctx context.Context, config *configure.Config, addrs []string) Client

type MockSignalClient

type MockSignalClient struct {
	MessagesFunc func() <-chan types.Message
	DoneFunc     func() <-chan struct{}
	WriteFunc    func(msg types.Message) error
}

func (MockSignalClient) Done

func (s MockSignalClient) Done() <-chan struct{}

func (MockSignalClient) Messages

func (s MockSignalClient) Messages() <-chan types.Message

func (MockSignalClient) Write

func (s MockSignalClient) Write(msg types.Message) error

type Server

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

func (*Server) Broadcast

func (s *Server) Broadcast(msg types.Message)

func (*Server) BroadcastNodes

func (s *Server) BroadcastNodes(msg types.Message)

func (*Server) BroadcastSignal

func (s *Server) BroadcastSignal(msg types.Message)

func (*Server) Handler

func (s *Server) Handler(ctx *fasthttp.RequestCtx)

func (*Server) ProcessSignal

func (s *Server) ProcessSignal()

type SignalClient

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

func (*SignalClient) Done

func (c *SignalClient) Done() <-chan struct{}

func (*SignalClient) Messages

func (c *SignalClient) Messages() <-chan types.Message

func (*SignalClient) Write

func (c *SignalClient) Write(msg types.Message) error

type WriteFunction

type WriteFunction func(types.Message) error

Jump to

Keyboard shortcuts

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