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 balance 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 //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 MethodType string Reply interface{} //just in local memory Metadata map[string]interface{} ContentType string //loadbalance stratery //Strategy loadbalance.Strategy Strategy string Filters []selector.Filter AppID string }
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
func (*Invocation) WithContext ¶
func (i *Invocation) WithContext(ctx context.Context) *Invocation
WithContext invocation with context
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.