Documentation
¶
Index ¶
- Constants
- func GetConn() (*kafukago.Conn, error)
- func GetNewReader(topic string, groupID string) *kafukago.Reader
- func GetNewWriter(topic string, async bool) (*kafukago.Writer, error)
- func InitAcademicRPC() (*academicservice.Client, error)
- func InitClassroomRPC() (*classroomservice.Client, error)
- func InitCommonRPC() (*commonservice.Client, error)
- func InitCourseRPC() (*courseservice.Client, error)
- func InitLaunchScreenRPC() (*launchscreenservice.Client, error)
- func InitLaunchScreenStreamRPC() (*launchscreenservice.StreamClient, error)
- func InitMySQL(tableName string) (db *gorm.DB, err error)
- func InitPaperRPC() (*paperservice.Client, error)
- func InitUserRPC() (*userservice.Client, error)
- func InitVersionRPC() (*versionservice.Client, error)
- func IsESConnected(es *elasticsearch.Client) bool
- func NewEsClient() (*elasticsearch.Client, error)
- func NewRedisClient(db int) (*redis.Client, error)
Constants ¶
View Source
const (
Timeout = 3 * time.Second // 默认超时时间
)
Variables ¶
This section is empty.
Functions ¶
func GetNewReader ¶
GetNewReader 创建一个reader示例,reader是并发安全的
func GetNewWriter ¶
GetNewWriter 创建一个writer示例,writer是并发安全的。
func InitAcademicRPC ¶
func InitAcademicRPC() (*academicservice.Client, error)
func InitClassroomRPC ¶
func InitClassroomRPC() (*classroomservice.Client, error)
func InitCommonRPC ¶
func InitCommonRPC() (*commonservice.Client, error)
func InitCourseRPC ¶
func InitCourseRPC() (*courseservice.Client, error)
func InitLaunchScreenRPC ¶
func InitLaunchScreenRPC() (*launchscreenservice.Client, error)
func InitLaunchScreenStreamRPC ¶
func InitLaunchScreenStreamRPC() (*launchscreenservice.StreamClient, error)
func InitPaperRPC ¶
func InitPaperRPC() (*paperservice.Client, error)
func InitUserRPC ¶
func InitUserRPC() (*userservice.Client, error)
func InitVersionRPC ¶
func InitVersionRPC() (*versionservice.Client, error)
func IsESConnected ¶
func IsESConnected(es *elasticsearch.Client) bool
func NewEsClient ¶
func NewEsClient() (*elasticsearch.Client, error)
func NewRedisClient ¶
NewRedisClient 传入dbName,具体参考 constants 包
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.