Documentation ¶
Overview ¶
Package mesg is a service client for mesg-core. For more information please visit https://mesg.com.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Execution ¶
type Execution struct { // ID is the execution id of task. ID string // Key is the name of task. Key string // contains filtered or unexported fields }
Execution holds information about a Task execution.
type Option ¶
type Option func(*Service)
Option is the configuration func of Service.
func DialOption ¶
DialOption used to mock socket communication for unit testing.
func EndpointOption ¶
EndpointOption receives the TCP endpoint of mesg-core.
func LogOutputOption ¶
LogOutputOption uses out as a log destination.
func TimeoutOption ¶
TimeoutOption receives d to use while dialing mesg-core and making requests.
func TokenOption ¶
TokenOption receives token which is the unique id of this service.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents a MESG service.
func (*Service) Close ¶
Close gracefully stops listening for future task execution requests and waits current ones to complete before closing underlying connection.
type Taskable ¶
type Taskable interface { // Key returns the task key. Key() string // Execute called when a task execution request arrived with the same key // returned by Name(). // outputKey is the output key and data is the output data of task. Execute(execution *Execution) (outputKey string, outputData Data) }
Taskable represents implementation of task executor.
Directories ¶
Path | Synopsis |
---|---|
examples
|
|
Package mesgtest is a testing package for MESG service.
|
Package mesgtest is a testing package for MESG service. |