mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-01-06 20:16:59 +00:00
Added documentations for package handler
This commit is contained in:
parent
deafe15967
commit
842daaa957
|
@ -1,3 +1,18 @@
|
|||
// Package handler handles incoming Gateway events. It reflects the function's
|
||||
// first argument and caches that for use in each event.
|
||||
//
|
||||
// Performance
|
||||
//
|
||||
// Each call to the event would take 156 ns/op for roughly each handler. Scaling
|
||||
// that up to 100 handlers is multiplying 156 ns by 100, which gives 15600 ns,
|
||||
// or 0.0156 ms.
|
||||
//
|
||||
// BenchmarkReflect-8 7260909 156 ns/op
|
||||
//
|
||||
// Usage
|
||||
//
|
||||
// s.AddHandler(func(m *gateway.MessageCreateEvent) {})
|
||||
//
|
||||
package handler
|
||||
|
||||
import (
|
||||
|
|
Loading…
Reference in a new issue