Documentation
¶
Index ¶
- type Client
- type ClientBuilder
- func (receiver *ClientBuilder) Build() (Client, error)
- func (receiver *ClientBuilder) Headers(headers map[string]string) *ClientBuilder
- func (receiver *ClientBuilder) HostAvailablerConfig(hostAvailablerConfig *core.HostAvailablerConfig) *ClientBuilder
- func (receiver *ClientBuilder) HostHeader(hostHeader string) *ClientBuilder
- func (receiver *ClientBuilder) Hosts(hosts []string) *ClientBuilder
- func (receiver *ClientBuilder) MetricsConfig(metricsConfig *metrics.Config) *ClientBuilder
- func (receiver *ClientBuilder) Region(region core.Region) *ClientBuilder
- func (receiver *ClientBuilder) Schema(schema string) *ClientBuilder
- func (receiver *ClientBuilder) Tenant(tenant string) *ClientBuilder
- func (receiver *ClientBuilder) TenantId(tenantId string) *ClientBuilder
- func (receiver *ClientBuilder) Token(token string) *ClientBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { common.Client // Release // release resources Release() // WriteUsers // // Writes at most 2000 users at a time. Exceeding 2000 in a request protocol.results protocol.in // a rejection. One can use this to upload new users, or update existing // users (by providing all the fields). WriteUsers(request *WriteUsersRequest, opts ...option.Option) (*WriteUsersResponse, error) // WriteProducts // // Writes at most 2000 products at a time. Exceeding 2000 in a request protocol.protocol.results // in a rejection. // One can use this to upload new products, or update existing products (by // providing all the fields). Deleting a product is unsupported. One can // update the existing product by // setting `product.is_recommendable` to False. WriteProducts(request *WriteProductsRequest, opts ...option.Option) (*WriteProductsResponse, error) // WriteUserEvents // // Writes at most 2000 UserEvents at a time. Exceeding 2000 in a request // results in a rejection. One should use this to upload new realtime // UserEvents. Note: This is processing realtime data, so we won't dedupe // the requests. // Please make sure the requests are deduplicated before sending over. WriteUserEvents(request *WriteUserEventsRequest, opts ...option.Option) (*WriteUserEventsResponse, error) // Predict // // Gets the list of products (ranked). // The updated user data will take effect in 24 hours. // The updated product data will take effect in 30 mins. // Depending how (realtime or batch) the UserEvents are sent back, it will // be fed into the models and take effect after that. Predict(request *PredictRequest, scene string, opts ...option.Option) (*PredictResponse, error) // AckServerImpressions // // Sends back the actual product list shown to the users based on the // customized changes from `PredictResponse`. // example: our Predict call returns the list of items [1, 2, 3, 4]. // Your custom logic have decided that product 3 has been sold out and // product 10 needs to be inserted before 2 based on some promotion rules, // the AckServerImpressionsRequest content items should looks like // [ // {id:1, altered_reason: "kept", rank:1}, // {id:10, altered_reason: "inserted", rank:2}, // {id:2, altered_reason: "kept", rank:3}, // {id:4, altered_reason: "kept", rank:4}, // {id:3, altered_reason: "filtered", rank:0}, // ]. AckServerImpressions(request *AckServerImpressionsRequest, opts ...option.Option) (*AckServerImpressionsResponse, error) }
type ClientBuilder ¶
type ClientBuilder struct {
// contains filtered or unexported fields
}
func (*ClientBuilder) Build ¶
func (receiver *ClientBuilder) Build() (Client, error)
func (*ClientBuilder) Headers ¶
func (receiver *ClientBuilder) Headers(headers map[string]string) *ClientBuilder
func (*ClientBuilder) HostAvailablerConfig ¶ added in v0.1.16
func (receiver *ClientBuilder) HostAvailablerConfig(hostAvailablerConfig *core.HostAvailablerConfig) *ClientBuilder
func (*ClientBuilder) HostHeader ¶
func (receiver *ClientBuilder) HostHeader(hostHeader string) *ClientBuilder
func (*ClientBuilder) Hosts ¶
func (receiver *ClientBuilder) Hosts(hosts []string) *ClientBuilder
func (*ClientBuilder) MetricsConfig ¶ added in v0.1.16
func (receiver *ClientBuilder) MetricsConfig(metricsConfig *metrics.Config) *ClientBuilder
func (*ClientBuilder) Region ¶
func (receiver *ClientBuilder) Region(region core.Region) *ClientBuilder
func (*ClientBuilder) Schema ¶
func (receiver *ClientBuilder) Schema(schema string) *ClientBuilder
func (*ClientBuilder) Tenant ¶
func (receiver *ClientBuilder) Tenant(tenant string) *ClientBuilder
func (*ClientBuilder) TenantId ¶
func (receiver *ClientBuilder) TenantId(tenantId string) *ClientBuilder
func (*ClientBuilder) Token ¶
func (receiver *ClientBuilder) Token(token string) *ClientBuilder
Source Files
¶
Click to show internal directories.
Click to hide internal directories.