Documentation ¶
Index ¶
Constants ¶
View Source
const ( HeaderKeyType = "seldon-infer-type" HeaderValueJsonReq = "json/inferModelRequest" HeaderValueJsonRes = "json/inferModelResponse" HeaderValueProtoReq = "proto/InferModelRequest" HeaderValueProtoRes = "proto/InferModelResponse" )
View Source
const ( DefaultNumWorkers = 8 EnvVarNumWorkers = "MODELGATEWAY_NUM_WORKERS" )
View Source
const ( EnvMaxNumConsumers = "MODELGATEWAY_MAX_NUM_CONSUMERS" DefaultMaxNumConsumers = 100 )
View Source
const (
SubscriberName = "seldon-modelgateway"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsumerConfig ¶
type ConsumerConfig struct { KafkaConfig *config.KafkaConfig Namespace string InferenceServerConfig *InferenceServerConfig TraceProvider *seldontracer.TracerProvider NumWorkers int // infer workers }
type ConsumerManager ¶
type ConsumerManager struct {
// contains filtered or unexported fields
}
func NewConsumerManager ¶
func NewConsumerManager(logger log.FieldLogger, consumerConfig *ConsumerConfig, maxNumConsumers int) *ConsumerManager
func (*ConsumerManager) AddModel ¶
func (cm *ConsumerManager) AddModel(modelName string) error
func (*ConsumerManager) GetNumModels ¶
func (cm *ConsumerManager) GetNumModels() int
func (*ConsumerManager) RemoveModel ¶
func (cm *ConsumerManager) RemoveModel(modelName string) error
func (*ConsumerManager) Stop ¶
func (cm *ConsumerManager) Stop()
type InferKafkaConsumer ¶
type InferKafkaConsumer struct {
// contains filtered or unexported fields
}
func NewInferKafkaConsumer ¶
func NewInferKafkaConsumer(logger log.FieldLogger, consumerConfig *ConsumerConfig, consumerName string) (*InferKafkaConsumer, error)
func (*InferKafkaConsumer) AddModel ¶
func (kc *InferKafkaConsumer) AddModel(modelName string) error
func (*InferKafkaConsumer) GetNumModels ¶
func (kc *InferKafkaConsumer) GetNumModels() int
func (*InferKafkaConsumer) RemoveModel ¶
func (kc *InferKafkaConsumer) RemoveModel(modelName string) error
func (*InferKafkaConsumer) Serve ¶
func (kc *InferKafkaConsumer) Serve()
func (*InferKafkaConsumer) Stop ¶
func (kc *InferKafkaConsumer) Stop()
type InferWorker ¶
type InferWorker struct {
// contains filtered or unexported fields
}
func NewInferWorker ¶
func NewInferWorker(consumer *InferKafkaConsumer, logger log.FieldLogger, traceProvider *seldontracer.TracerProvider, topicNamer *kafka2.TopicNamer) (*InferWorker, error)
func (*InferWorker) Start ¶
func (iw *InferWorker) Start(jobChan <-chan *InferWork, cancelChan <-chan struct{})
type InferenceServerConfig ¶
type KafkaModelConfig ¶
type KafkaSchedulerClient ¶
type KafkaSchedulerClient struct {
// contains filtered or unexported fields
}
func NewKafkaSchedulerClient ¶
func NewKafkaSchedulerClient(logger logrus.FieldLogger, consumerManager *ConsumerManager) *KafkaSchedulerClient
func (*KafkaSchedulerClient) ConnectToScheduler ¶
func (kc *KafkaSchedulerClient) ConnectToScheduler(host string, plainTxtPort int, tlsPort int) error
func (*KafkaSchedulerClient) Start ¶
func (kc *KafkaSchedulerClient) Start() error
func (*KafkaSchedulerClient) Stop ¶
func (kc *KafkaSchedulerClient) Stop()
func (*KafkaSchedulerClient) SubscribeModelEvents ¶
func (kc *KafkaSchedulerClient) SubscribeModelEvents() error
Click to show internal directories.
Click to hide internal directories.