Documentation ¶
Overview ¶
Package client provides an api client
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client enables generic calls to micro
func (*Client) SetTimeout ¶
SetTimeout sets the http client's timeout
type Options ¶
type Options struct { // Token for authentication Token string // Address of the micro platform. // By default it connects to live. Change it or use the local flag // to connect to your local installation. Address string // Helper flag to help users connect to the default local address Local bool // set a timeout Timeout time.Duration }
Options of the Client
type Request ¶
type Request struct { // eg. "go.micro.srv.greeter" Service string `json:"service"` // eg. "Say.Hello" Endpoint string `json:"endpoint"` // json and then base64 encoded body Body string `json:"body"` }
Request is the request of the generic `api-client` call
type Response ¶
type Response struct { // json and base64 encoded response body Body string `json:"body"` // error fields. Error json example // {"id":"go.micro.client","code":500,"detail":"malformed method name: \"\"","status":"Internal Server Error"} Code int `json:"code"` ID string `json:"id"` Detail string `json:"detail"` Status string `json:"status"` }
Response is the response of the generic `api-client` call.
Click to show internal directories.
Click to hide internal directories.