Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
Register creates a new channel for a GraphQL source path, superseding any existing registration. The newest registration owns the path: when a workflow moves between workers, the one taking the lease over is the one that should receive.
It used to return the existing channel instead, which meant the worker taking over and the worker being replaced read from the same one — so the outgoing teardown closed the channel its successor was reading.
func Unregister ¶
Unregister releases a path, but only if ch is still the channel registered for it.
The ownership check is what makes a handover safe. Nothing orders the outgoing worker's teardown against the incoming worker's registration, so deleting by path alone let a worker that had already lost the lease close and remove its successor's channel. The successor was then reading from a closed channel that no longer appeared in the registry: the workflow reported itself running and never received another message.
Types ¶
type GraphQLSource ¶
type GraphQLSource struct {
Path string
// contains filtered or unexported fields
}
GraphQLSource implements the hermod.Source interface for receiving GraphQL requests.
func NewGraphQLSource ¶
func NewGraphQLSource(path string) *GraphQLSource
NewGraphQLSource creates a new GraphQLSource.
func (*GraphQLSource) Close ¶
func (s *GraphQLSource) Close() error