-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.go
34 lines (25 loc) · 945 Bytes
/
constants.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package main
// Config
const KafkaTopicEnvVar string = "KAFKA_TOPIC"
const KakfaBrokersEnvVar string = "KAFKA_BROKERS"
const KafkaTopicPartitionsEnvVar string = "KAFKA_TOPIC_PARTITIONS"
const KafkaTopicReplicationFactorEnvVar string = "KAFKA_TOPIC_REPLICATION_FACTOR"
// Defaults
const DefaultKafkaTopicPartitions int32 = 1
const DefaultKafkaTopicReplicationFactor int16 = 1
// CloudEvent attributes
const KFServingRequestType = "org.kubeflow.serving.inference.request"
const KFServingResponseType = "org.kubeflow.serving.inference.response"
const Type = "type"
const ID = "id"
const Time = "time"
const Payload = "payload"
const InferenceServiceName = "inferenceservicename"
const Endpoint = "endpoint"
const Namespace = "namespace"
const RequestType = "request"
const ResponseType = "response"
// DefaultTopicName returns a default name for Kafka topics
func DefaultTopicName(name string) string {
return name + "-inference-topic"
}