Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
NewHandler creates a new HTTP service Handler
func (*Handler) NewContext ¶
func (h *Handler) NewContext() (context.Context, context.CancelFunc)
NewContext creates a new context
type Option ¶
type Option interface {
Apply(c *Service)
}
func WithDataStorer ¶
WithDataStorer creates dictionary option
type Request ¶
type Request struct { Body []byte Feeds []interface{} // contains filtered or unexported fields }
Request represent a request
func (*Request) UnmarshalJSONObject ¶
UnmarshalJSONObject umarshal
type Response ¶
type Response struct { Status string Error string DictHash int Data interface{} ServiceTimeMcs int // contains filtered or unexported fields }
Response represents service response
func (*Response) MarshalJSONObject ¶
MarshalJSONObject marshal response
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents ml service
func New ¶
func New(ctx context.Context, fs afs.Service, cfg *config.Model, metrics *gmetric.Service, datastores map[string]*datastore.Service, options ...Option) (*Service, error)
New creates a service
func (*Service) Dictionary ¶
func (s *Service) Dictionary() *common.Dictionary
Dictionary returns servie dictionary
func (*Service) NewRequest ¶
NewRequest creates a new request
Source Files
¶
Click to show internal directories.
Click to hide internal directories.