1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-09 16:35:12 +00:00
arikawa/gateway
diamondburned efde3f4ea6
state, handler: Refactor state storage and sync handlers
This commit refactors a lot of packages.

It refactors the handler package, removing the Synchronous field and
replacing it the AddSyncHandler API, which allows each handler to
control whether or not it should be ran synchronously independent of
other handlers. This is useful for libraries that need to guarantee the
incoming order of events.

It also refactors the store interfaces to accept more interfaces. This
is to make the API more consistent as well as reducing potential useless
copies. The public-facing state API should still be the same, so this
change will mostly concern users with their own store implementations.

Several miscellaneous functions (such as a few in package gateway) were
modified to be more suitable to other packages, but those functions
should rarely ever be used, anyway.

Several tests are also fixed within this commit, namely fixing state's
intents bug.
2021-11-03 15:16:02 -07:00
..
shard shard: Separate state's cabinet, fix return bugs 2021-10-31 13:10:34 -07:00
commands.go api: Threads (#257) 2021-08-08 13:19:15 -07:00
events.go discord: Add per-guild avatars, ModifyMe -> ModifyCurrentUser (#278) 2021-09-28 11:46:36 -07:00
events_map.go discord: Update to match current API docs (#277) 2021-09-23 21:37:50 -07:00
gateway.go gateway: Fix Context overwrite in Gateway.Open (#285) 2021-10-20 15:06:06 -07:00
identify.go gateway: Change type of IdentifyData.Intents to option.Uint (#275) 2021-09-09 18:45:08 -07:00
integration_test.go shard: Remake shard manager (#226) 2021-06-14 15:22:55 -07:00
intents.go shard: Remake shard manager (#226) 2021-06-14 15:22:55 -07:00
op.go gateway: Skip unknown events while reconnecting (#255) 2021-08-03 18:00:31 -07:00
perseverance_test.go *: Migrated Go Modules to v3 2021-06-01 19:59:01 -07:00
ready.go state, handler: Refactor state storage and sync handlers 2021-11-03 15:16:02 -07:00