Documentation
¶
Index ¶
- Variables
- func NewEntClient(connInfo SqlDBConn) (*ent.Client, error)
- type PendingCogRequestRedis
- type PostgresConn
- type RedisStats
- type RedisWrapper
- func (r *RedisWrapper) CacheEmbeddings(ctx context.Context, key string, embedding []float32) error
- func (r *RedisWrapper) CacheTranslation(ctx context.Context, key string, translation string) error
- func (r *RedisWrapper) DeleteCogRequestStreamID(ctx context.Context, requestID string) (int64, error)
- func (r *RedisWrapper) DeleteDiscordToken(discordId string) error
- func (r *RedisWrapper) EnqueueCogRequest(ctx context.Context, stream string, request interface{}) error
- func (r *RedisWrapper) GetCogRequestStreamID(ctx context.Context, requestID string) (string, error)
- func (r *RedisWrapper) GetDiscordTokenFromID(discordId string) (string, error)
- func (r *RedisWrapper) GetEmbeddings(ctx context.Context, key string) ([]float32, error)
- func (r *RedisWrapper) GetPendingGenerationAndUpscaleIDs(olderThan time.Duration) (generationOutputIDs, upscaleOutputIDs []PendingCogRequestRedis, err error)
- func (r *RedisWrapper) GetQueueSize() (int64, error)
- func (r *RedisWrapper) GetStatsCount() (stats *RedisStats, err error)
- func (r *RedisWrapper) GetTranslation(ctx context.Context, key string) (string, error)
- func (r *RedisWrapper) GetWorkerHealth() (shared.HEALTH_STATUS, error)
- func (r *RedisWrapper) SetCogRequestStreamID(ctx context.Context, requestID string, streamID string) error
- func (r *RedisWrapper) SetDiscordVerifyToken(discordId string) (string, error)
- func (r *RedisWrapper) SetOutputCount(generationOutputCount, upscaleOutputCount, voiceoverOutputCount int) error
- func (r *RedisWrapper) SetWorkerHealth(status shared.HEALTH_STATUS) error
- func (r *RedisWrapper) XDelListOfIDs(ids []string) (deleted int64, err error)
- type SqlDBConn
- type SqliteConn
- type SupabaseAuth
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type PendingCogRequestRedis ¶
type PendingCogRequestRedis struct { RedisMsgid string Type shared.ProcessType ID uuid.UUID }
type PostgresConn ¶
func (*PostgresConn) DSN ¶
func (c *PostgresConn) DSN() string
func (*PostgresConn) Dialect ¶
func (c *PostgresConn) Dialect() string
type RedisStats ¶
type RedisWrapper ¶
func NewRedis ¶
func NewRedis(ctx context.Context) (*RedisWrapper, error)
Returns our *RedisWrapper, since we wrap some useful methods with the redis client
func (*RedisWrapper) CacheEmbeddings ¶
Caching embeddings
func (*RedisWrapper) CacheTranslation ¶
Caching translations
func (*RedisWrapper) DeleteCogRequestStreamID ¶
func (r *RedisWrapper) DeleteCogRequestStreamID(ctx context.Context, requestID string) (int64, error)
Delete the stream ID of the client for a given request ID
func (*RedisWrapper) DeleteDiscordToken ¶
func (r *RedisWrapper) DeleteDiscordToken(discordId string) error
Delete token
func (*RedisWrapper) EnqueueCogRequest ¶
func (r *RedisWrapper) EnqueueCogRequest(ctx context.Context, stream string, request interface{}) error
Enqueues a request to sc-worker
func (*RedisWrapper) GetCogRequestStreamID ¶
Get the stream ID of the client for a given request ID
func (*RedisWrapper) GetDiscordTokenFromID ¶
func (r *RedisWrapper) GetDiscordTokenFromID(discordId string) (string, error)
Get discord ID from token
func (*RedisWrapper) GetEmbeddings ¶
Retrieve from cache
func (*RedisWrapper) GetPendingGenerationAndUpscaleIDs ¶
func (r *RedisWrapper) GetPendingGenerationAndUpscaleIDs(olderThan time.Duration) (generationOutputIDs, upscaleOutputIDs []PendingCogRequestRedis, err error)
Get pending request IDs on queue that are stale olderThan will be subtracted from the current time to return requests older than that
func (*RedisWrapper) GetQueueSize ¶
func (r *RedisWrapper) GetQueueSize() (int64, error)
func (*RedisWrapper) GetStatsCount ¶
func (r *RedisWrapper) GetStatsCount() (stats *RedisStats, err error)
Get generate and upscale count stats
func (*RedisWrapper) GetTranslation ¶
Retrieve from cache
func (*RedisWrapper) GetWorkerHealth ¶
func (r *RedisWrapper) GetWorkerHealth() (shared.HEALTH_STATUS, error)
func (*RedisWrapper) SetCogRequestStreamID ¶
func (r *RedisWrapper) SetCogRequestStreamID(ctx context.Context, requestID string, streamID string) error
Keep track of request ID to cog, with stream ID of the client, for timeout tracking
func (*RedisWrapper) SetDiscordVerifyToken ¶
func (r *RedisWrapper) SetDiscordVerifyToken(discordId string) (string, error)
Set verify token and return token
func (*RedisWrapper) SetOutputCount ¶
func (r *RedisWrapper) SetOutputCount(generationOutputCount, upscaleOutputCount, voiceoverOutputCount int) error
Set generate and upscale count stats
func (*RedisWrapper) SetWorkerHealth ¶
func (r *RedisWrapper) SetWorkerHealth(status shared.HEALTH_STATUS) error
func (*RedisWrapper) XDelListOfIDs ¶
func (r *RedisWrapper) XDelListOfIDs(ids []string) (deleted int64, err error)
type SqlDBConn ¶
func GetSqlDbConn ¶
Gets the DB connection information based on environment variables
type SqliteConn ¶
func (*SqliteConn) DSN ¶
func (c *SqliteConn) DSN() string
func (*SqliteConn) Dialect ¶
func (c *SqliteConn) Dialect() string
type SupabaseAuth ¶
type SupabaseAuth struct {
// contains filtered or unexported fields
}
func (*SupabaseAuth) AuthorizeWithDiscord ¶
func (s *SupabaseAuth) AuthorizeWithDiscord() (authUrl string, err error)
func (*SupabaseAuth) DeleteUser ¶
func (s *SupabaseAuth) DeleteUser(id uuid.UUID) error
func (*SupabaseAuth) GetSupabaseUserIdFromAccessToken ¶
Directories
¶
Path | Synopsis |
---|---|
Package qdrant provides primitives to interact with the openapi HTTP API.
|
Package qdrant provides primitives to interact with the openapi HTTP API. |
Description: Processes realtime messages from cog and updates the database
|
Description: Processes realtime messages from cog and updates the database |