Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSDK = New()
DefaultSDK 默认的sdk客户端
Functions ¶
This section is empty.
Types ¶
type ModelServiceConn ¶
type ModelServiceConn struct { tfserv.ModelServiceClient // contains filtered or unexported fields }
ModelServiceConn 客户端类
func (*ModelServiceConn) NewCtx ¶ added in v0.0.3
func (c *ModelServiceConn) NewCtx() (ctx context.Context, cancel context.CancelFunc)
type PredictionServiceConn ¶
type PredictionServiceConn struct { tfserv.PredictionServiceClient // contains filtered or unexported fields }
PredictionServiceConn 客户端类
func (*PredictionServiceConn) NewCtx ¶ added in v0.0.3
func (c *PredictionServiceConn) NewCtx() (ctx context.Context, cancel context.CancelFunc)
type SDK ¶ added in v0.0.2
type SDK struct { *SDKConfig // contains filtered or unexported fields }
SDK 的客户端类型
func (*SDK) NewModelServiceConn ¶ added in v0.0.2
func (c *SDK) NewModelServiceConn() (*ModelServiceConn, error)
ModelServiceConn 建立一个新的连接
func (*SDK) NewPredictionServiceConn ¶ added in v0.0.2
func (c *SDK) NewPredictionServiceConn() (*PredictionServiceConn, error)
ModelServiceConn 建立一个新的连接
type SDKConfig ¶
type SDKConfig struct { Address []string `json:"address" jsonschema:"description=连接服务的主机和端口"` Service_Name string `json:"service_name,omitempty" jsonschema:"description=服务器域名"` App_Name string `json:"app_name,omitempty" jsonschema:"description=服务名"` App_Version string `json:"app_version,omitempty" jsonschema:"description=服务版本"` // 性能设置 Initial_Window_Size int `json:"initial_window_size,omitempty" jsonschema:"description=基于Stream的滑动窗口大小"` Initial_Conn_Window_Size int `json:"initial_conn_window_size,omitempty" jsonschema:"description=基于Connection的滑动窗口大小"` Keepalive_Time int `json:"keepalive_time,omitempty" jsonschema:"description=空闲连接每隔n秒ping一次客户端已确保连接存活"` Keepalive_Timeout int `json:"keepalive_timeout,omitempty" jsonschema:"description=ping时长超过n则认为连接已死"` Keepalive_Enforcement_Permit_Without_Stream bool `` /* 134-byte string literal not displayed */ Conn_With_Block bool `json:"conn_with_block,omitempty" jsonschema:"description=同步的连接建立"` Max_Recv_Msg_Size int `json:"max_rec_msg_size,omitempty" jsonschema:"description=允许接收的最大消息长度"` Max_Send_Msg_Size int `json:"max_send_msg_size,omitempty" jsonschema:"description=允许发送的最大消息长度"` //压缩设置,目前只支持gzip Compression string `json:"compression,omitempty" jsonschema:"description=使用哪种方式压缩发送的消息,enum=gzip"` // TLS设置 Ca_Cert_Path string `json:"ca_cert_path,omitempty" jsonschema:"description=如果要使用tls则需要指定根证书位置"` Client_Cert_Path string `json:"client_cert_path,omitempty" jsonschema:"description=客户端整数位置"` Client_Key_Path string `json:"client_key_path,omitempty" jsonschema:"description=客户端证书对应的私钥位置"` // XDS设置 XDS_CREDS bool `json:"xds_creds,omitempty" jsonschema:"description=当address的schema是xds时是否使用xds的令牌加密访问"` // 请求超时设置 Query_Timeout int `json:"query_timeout,omitempty" jsonschema:"description=请求服务的最大超时时间单位ms"` }
SDKConfig 的客户端类型
Source Files
¶
Click to show internal directories.
Click to hide internal directories.