channel

package
v0.0.0-...-2ab1e11 Latest Latest
Warning

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

Go to latest
Published: May 1, 2015 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	Topic string
	// contains filtered or unexported fields
}

func NewChannel

func NewChannel(name string) *Channel

func (*Channel) Clients

func (c *Channel) Clients() []Client

func (*Channel) Empty

func (c *Channel) Empty() bool

func (*Channel) Join

func (c *Channel) Join(client Client)

func (*Channel) Leave

func (c *Channel) Leave(client Client)

func (*Channel) Name

func (c *Channel) Name() string

func (*Channel) Names

func (c *Channel) Names() []string

func (*Channel) Send

func (c *Channel) Send(msg message.M)

func (*Channel) SendExcept

func (c *Channel) SendExcept(msg message.M, name string)

type Channels

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

func NewChannels

func NewChannels() *Channels

func (*Channels) Add

func (cs *Channels) Add(c *Channel)

func (*Channels) Any

func (cs *Channels) Any() bool

func (*Channels) Each

func (cs *Channels) Each(f func(*Channel))

func (*Channels) Find

func (cs *Channels) Find(name string) (*Channel, bool)

func (*Channels) Names

func (cs *Channels) Names() []string

func (*Channels) Remove

func (cs *Channels) Remove(c *Channel)

type Client

type Client interface {
	Send(message.M)
	Name() string
}

Jump to

Keyboard shortcuts

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