-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
30 lines (21 loc) · 1.25 KB
/
errors.go
File metadata and controls
30 lines (21 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// SPDX-License-Identifier: EUPL-1.2
package stream
import "dappco.re/go/core"
// Sentinel errors for the stream package. All errors use core.E().
var (
// ErrMissingAuthHeader is returned when no Authorization header is present.
ErrMissingAuthHeader = core.E("stream.auth", "missing Authorization header", nil)
// ErrMalformedAuthHeader is returned when the header is not "Bearer <token>".
ErrMalformedAuthHeader = core.E("stream.auth", "malformed Authorization header", nil)
// ErrInvalidAPIKey is returned when the API key is not in the key map.
ErrInvalidAPIKey = core.E("stream.auth", "invalid API key", nil)
// ErrHandshakeTimeout is returned when the TCP/ZMQ peer did not send a
// handshake within the configured deadline.
ErrHandshakeTimeout = core.E("stream.auth", "handshake timeout", nil)
// ErrAuthRejected is returned when ConnAuthenticator denies the handshake.
ErrAuthRejected = core.E("stream.auth", "connection rejected by authenticator", nil)
// ErrHubNotRunning is returned when Publish or Broadcast is called before Run.
ErrHubNotRunning = core.E("stream.hub", "hub not running", nil)
// ErrEmptyChannel is returned when Subscribe is called with an empty channel name.
ErrEmptyChannel = core.E("stream.hub", "empty channel", nil)
)