Documentation ¶
Index ¶
- func Start(options shared.Options)
- type CommandCallback
- type Message
- type MessageType
- type RobocatFile
- type RobocatInput
- type RobocatRunner
- type RunnerArguments
- type Server
- func (s *Server) ConnectionEstablished() bool
- func (s *Server) On(name string, callback CommandCallback)
- func (s *Server) Send(name string, body ...interface{}) error
- func (s *Server) SendError(err error) error
- func (s *Server) SendErrorf(format string, a ...any) error
- func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- type ServerState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommandCallback ¶
type Message ¶
type Message struct { Type MessageType `json:"type"` Name string `json:"name"` Body json.RawMessage `json:"body,omitempty"` Ref string `json:"ref,omitempty"` // contains filtered or unexported fields }
func MessageFromBytes ¶
func NewMessageWithBody ¶
func (*Message) ReplyWithError ¶
type MessageType ¶
type MessageType string
const ( Update MessageType = "update" Command MessageType = "command" )
type RobocatFile ¶
type RobocatFile struct { Path string `json:"path"` // Mime-Type of the file (set only for outputs to aid decoding the payload). MimeType string `json:"type"` Payload []byte `json:"payload"` }
func ParseFileFromMessage ¶
func ParseFileFromMessage(m *Message) (*RobocatFile, error)
type RobocatInput ¶
type RobocatInput struct {
// contains filtered or unexported fields
}
func NewRobocatInput ¶
func NewRobocatInput(runner *RobocatRunner) *RobocatInput
type RobocatRunner ¶
type RobocatRunner struct {
// contains filtered or unexported fields
}
func NewRobocatRunner ¶
func NewRobocatRunner() *RobocatRunner
func (*RobocatRunner) GetFlowBasePath ¶
func (r *RobocatRunner) GetFlowBasePath(elem ...string) (string, error)
func (*RobocatRunner) GetInput ¶
func (r *RobocatRunner) GetInput() *RobocatInput
type RunnerArguments ¶
type RunnerArguments struct { Flow string `json:"flow"` Data string `json:"data"` Proxy string `json:"proxy"` }
func (*RunnerArguments) ToArray ¶
func (a *RunnerArguments) ToArray() []string
type Server ¶
func (*Server) ConnectionEstablished ¶
func (*Server) On ¶
func (s *Server) On(name string, callback CommandCallback)
type ServerState ¶ added in v0.2.0
type ServerState struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.