Documentation
¶
Index ¶
- type Source
- func (s *Source) Ack(ctx context.Context, msg hermod.Message) error
- func (s *Source) Close() error
- func (s *Source) Ping(ctx context.Context) error
- func (s *Source) Read(ctx context.Context) (hermod.Message, error)
- func (s *Source) SetResponse(wait bool, timeout time.Duration)
- func (s *Source) SetTLSConfig(cfg *tls.Config, pinSHA256 string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source is a client-mode WebSocket source that dials a ws/wss URL and produces one message per received text frame. The frame is expected to be a JSON envelope with optional fields; raw payload is placed into Message.Payload.
func (*Source) SetResponse ¶ added in v1.17.0
SetResponse makes the source answer each frame it reads with what the workflow did with it, on the connection the frame arrived on. timeout is how long it waits for the workflow before answering "pending". Call it before the first Read.
Click to show internal directories.
Click to hide internal directories.