Documentation
¶
Index ¶
- Constants
- type State
- func (s *State) AddMessage(m discord.Message)
- func (s *State) Broadcast(r templates.Renderer)
- func (s *State) Close() error
- func (s *State) CopyPool() templates.Messages
- func (s *State) DeleteMessage(id discord.MessageID)
- func (s *State) EditMessage(m discord.Message)
- func (s *State) Handler(w http.ResponseWriter, r *http.Request) (int, error)
- func (s *State) RegisterWriter(w io.Writer, ctx context.Context) (int, error)
- func (s *State) StopTyping(user discord.User)
Constants ¶
View Source
const BufSz = 25
View Source
const PoolBuf = 5
View Source
const TypingTimeout = 10 * time.Second
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type State ¶
type State struct { MessagePool templates.Messages MessageMu sync.Mutex LastAuthor *discord.User Typers *templates.Typing Typing chan *gateway.TypingStartEvent StopType chan discord.User // userID Session *state.State ChannelID discord.ChannelID GuildID discord.GuildID ClientPool map[uint64]chan<- templates.Renderer ClientMu sync.RWMutex Counter uint64 // contains filtered or unexported fields }
func (*State) AddMessage ¶
func (*State) DeleteMessage ¶
func (*State) EditMessage ¶
func (*State) RegisterWriter ¶
func (*State) StopTyping ¶
Click to show internal directories.
Click to hide internal directories.