fleet/server/pubsub/doc.go
Zach Wasserman fb32f0cf40
Remove kolide types and packages from backend (#974)
Generally renamed `kolide` -> `fleet`
2021-06-06 15:07:29 -07:00

25 lines
681 B
Go

// Package pubsub implements pub/sub interfaces defined in package fleet.
package pubsub
// Error defines the interface of errors specific to the pubsub package
type Error interface {
error
// NoSubscriber returns true if the error occurred because there are no
// subscribers on the channel
NoSubscriber() bool
}
// NoSubscriberError can be returned when channel operations fail because there
// are no subscribers. Its NoSubscriber() method always returns true.
type noSubscriberError struct {
Channel string
}
func (e noSubscriberError) Error() string {
return "no subscriber for channel " + e.Channel
}
func (e noSubscriberError) NoSubscriber() bool {
return true
}