Documentation
¶
Index ¶
- Variables
- func WithConfig(config *FeastHttpClientConfig) optparams.Option[FeastHttpClientConfig]
- func WithQueryAddress(address string) optparams.Option[FeastHttpClientConfig]
- func WithQueryTimeout(timeout int) optparams.Option[FeastHttpClientConfig]
- type FeastHttpClient
- type FeastHttpClientConfig
- type GetOnlineFeaturesHttpReq
- type GetOnlineFeaturesHttpResp
- type GetOnlineFeaturesHttpRespMetaData
- type GetOnlineFeaturesHttpRespResult
- type PushReqest
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSDK = New()
DefaultSDK 默认的sdk,需要使用Init方法初始化
View Source
var ErrClientInited = errors.New("client already inited")
View Source
var ErrClientNotInit = errors.New("client not init")
View Source
var ErrHttpQueryNotOK = errors.New("http query not ok")
Functions ¶
func WithConfig ¶
func WithConfig(config *FeastHttpClientConfig) optparams.Option[FeastHttpClientConfig]
UntilEnd NewCtx方法的参数,用于设置ctx为不会超时
func WithQueryAddress ¶
func WithQueryAddress(address string) optparams.Option[FeastHttpClientConfig]
WithQueryAddress Init方法的参数,用于设置sdk请求的地址 @params address ...string 连接服务的主机地址
func WithQueryTimeout ¶
func WithQueryTimeout(timeout int) optparams.Option[FeastHttpClientConfig]
WithQueryTimeout sdk.Init方法的参数,用于设置sdk请求服务的最大超时时间 @params wait int 请求服务的最大超时时间,单位ms
Types ¶
type FeastHttpClient ¶
type FeastHttpClient struct { SDKConfig *FeastHttpClientConfig // contains filtered or unexported fields }
func New ¶
func New(opts ...optparams.Option[FeastHttpClientConfig]) *FeastHttpClient
func (*FeastHttpClient) GetOnlineFeatures ¶
func (c *FeastHttpClient) GetOnlineFeatures(q *GetOnlineFeaturesHttpReq) (*GetOnlineFeaturesHttpResp, error)
GetOnlineFeatures 获取数据接口 @params q *GetOnlineFeaturesHttpReq 请求数据 @returns *GetOnlineFeaturesHttpResp 返回数据
func (*FeastHttpClient) Init ¶
func (c *FeastHttpClient) Init(opts ...optparams.Option[FeastHttpClientConfig]) error
Init 初始化
func (*FeastHttpClient) Push ¶
func (c *FeastHttpClient) Push(q *PushReqest) error
Push 推送数据接口 @params q *PushReqest push请求
type FeastHttpClientConfig ¶
type GetOnlineFeaturesHttpResp ¶
type GetOnlineFeaturesHttpResp struct { MetaData *GetOnlineFeaturesHttpRespMetaData `json:"metadata"` Results []*GetOnlineFeaturesHttpRespResult `json:"results"` }
type GetOnlineFeaturesHttpRespMetaData ¶
type GetOnlineFeaturesHttpRespMetaData struct {
FeatureNames []string `json:"feature_names"`
}
Click to show internal directories.
Click to hide internal directories.