Documentation
¶
Index ¶
Constants ¶
View Source
const ( Consumer = iota Provider )
constant values for consumer and provider
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Invocation ¶
type Invocation struct {
//service's ip and port, it is decided in load balancer
Endpoint string
//specify rest,highway
Protocol string
//Ctx value will be send as header in transport
Ctx context.Context
SourceServiceID string
SourceMicroService string
MicroServiceName string
Version string
AppID string
//correspond struct
SchemaID string
//correspond struct func
OperationID string
Args interface{}
//an url path has muntil path params such as "/v2/microsvice/:id/instance/:instanceid",http client use this to format correct url
URLPathFormat string
Reply interface{}
//just in local memory
Metadata map[string]interface{}
//loadbalancer stratery
//Strategy loadbalancer.Strategy
Strategy string
Filters []loadbalancer.Filter
}
Invocation is the basic struct that used in go sdk to make client and transport layer transparent . developer should implements a client which is able to encode from invocation to there own request
type InvocationResponse ¶
InvocationResponse invocation response struct
type ResponseCallBack ¶
type ResponseCallBack func(*InvocationResponse) error
ResponseCallBack process invocation response
Click to show internal directories.
Click to hide internal directories.