Documentation
¶
Index ¶
Constants ¶
View Source
const ( ApiHost = "0.0.0.0" UserHost = "0.0.0.0" LectureHost = "0.0.0.0" ChatHost = "0.0.0.0" PushHost = "0.0.0.0" QuizHost = "0.0.0.0" AgentHost = "0.0.0.0" ApiPort = "10000" UserPort = "10001" LecturePort = "10002" ChatPort = "10003" PushPort = "10004" QuizPort = "10005" AgentPort = "10006" ApiConfig = "./server/cmd/api/config.yaml" UserConfig = "./server/cmd/user/config.yaml" LectureConfig = "./server/cmd/lecture/config.yaml" ChatConfig = "./server/cmd/chat/config.yaml" PushConfig = "./server/cmd/push/config.yaml" QuizConfig = "./server/cmd/quiz/config.yaml" AgentConfig = "./server/cmd/agent/config.yaml" ApiSrvPrefix = "api-svc" UserSrvPrefix = "user-svc" LectureSrvPrefix = "lecture-svc" ChatSrvPrefix = "chat-svc" PushSrvPrefix = "push-svc" QuizSrvPrefix = "quiz-svc" AgentSrvPrefix = "agent-svc" OtelEndpoint = "otel-collector:4317" )
ServerConfig
View Source
const ( MysqlDNS = "%s:%s@tcp(%s:%s)/%s?charset=utf8mb4&parseTime=True&loc=Asia%%2FShanghai" MysqlHost = "mysql" MysqlUser = "root" MysqlPassword = "123456" MysqlDatabase = "apex_db" MysqlPort = "3306" )
MysqlConfig
View Source
const ( RedisHost = "redis" RedisPort = "6379" RedisPassword = "123456" RedisDatabase = 0 )
RedisConfig
View Source
const ( MinioEndpoint = "minio:9000" MinioAccessKey = "minio" MinioSecretKey = "123456789" MinioBucket = "lecture" MinioSecure = false )
MinioConfig
View Source
const ( KafkaUsername = "root" KafkaPassword = "123456" KafkaBroker1 = "kafka1:9092" KafkaBroker2 = "kafka2:9092" KafkaBroker3 = "kafka3:9092" LectureKafkaTopic = "lecture" LectureKafkaGroup = "lecture" ChatKafkaTopic = "chat" ChatKafkaGroup = "chat" QuizKafkaTopic = "quiz" QuizKafkaGroup = "quiz" AgentKafkaTopic = "agent" AgentKafkaGroup = "agent" )
KafkaConfig
View Source
const ( RabbitMqDNS = "amqp://%s:%s@%s:%s/" RabbitMqHost = "rabbitmq" RabbitMqUser = "guest" RabbitMqPassword = "guest" RabbitMqPort = "5672" LectureExchange = "lecture" LectureDeadLetterExchange = "dlx_lecture" ChatExchange = "chat" ChatDeadLetterExchange = "dlx_chat" QuizExchange = "quiz" QuizDeadLetterExchange = "dlx_quiz" AgentExchange = "agent" AgentDeadLetterExchange = "dlx_agent" )
View Source
const ( AgentBaseURL = "https://ark.cn-beijing.volces.com/api/v3" AgentRegion = "cn-beijing" AgentAPIKey = "cce9cdd5-95db-4be7-8417-5e9cc3c16fed" AgentModel = "deepseek-r1-250120" )
ChatModel
View Source
const ( PrivateKey = "./server/cmd/user/keys/private_key.pem" PublicKey = "./server/cmd/user/keys/public_key.pem" )
key
View Source
const ( HlogFilePath = "./tmp/hlog/" KlogFilePath = "./tmp/klog/" IvfFilePath = "./tmp/record/%d/video.ivf" OggFilePath = "./tmp/record/%d/audio.ogg" MinioObjectName = "%d:%s" EtcdSnowFlakeNode = 1 UserIDSnowFlakeNode = 2 LectureIDSnowFlakeNode = 3 AttendanceIDSnowFlakeNode = 4 MessageIDSnowFlakeNode = 5 )
Other
View Source
const ( DeleteSignal = "__DELETE__" UnKnownSignal = "__UNKNOWN__" RoomKey = "lecture:room:%d" QuestionAnswerKey = "quiz:answer:%d" WrongAnswerRecordKey = "quiz:wrong_answer:%d" AcceptAnswerRecordKey = "quiz:accept_answer:%d" QuizLockKey = "quiz:lock:%d" AudienceKey = "lecture:audiences:%d" LatestMsgListKey = "lecture:latest_msg_list:%d" HistoryMsgKey = "agent:history_msg:%d:%d" SummaryStartedLock = "agent:summary_started_lock:%d" )
RedisMessage
View Source
const ( NotCreate = 0 NoSummary = 1 Summarized = 2 OtherError = 3 )
some status agent 服务里面,有几个状态,不好梳理 在这里用常量表示
View Source
const ( EtcdHost = "localhost" EtcdPort = "2379" )
etcd
View Source
const (
GoogleCredentialsFile = "./path/to/your/credentials.json"
)
GoogleCredentials
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.