Documentation ¶
Index ¶
- Variables
- func GetBucketFromRKey(rkey string) (int, error)
- func GetHighestRKeyForBucket(bucket int) string
- func GetLowestRKeyForBucket(bucket int) string
- type Post
- type ShardDB
- func (s *ShardDB) CreatePostTable(ctx context.Context) error
- func (s *ShardDB) DeletePost(ctx context.Context, actorDID, rkey string, indexedAt time.Time, bucket int) error
- func (s *ShardDB) GetPostMetas(ctx context.Context, bucket, limit int, cursor time.Time) ([]*Post, time.Time, error)
- func (s *ShardDB) GetPosts(ctx context.Context, bucket, limit int, cursor time.Time) ([]*Post, time.Time, error)
- func (s *ShardDB) InsertPost(ctx context.Context, post Post) error
Constants ¶
This section is empty.
Variables ¶
View Source
var QueryDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "sharddb_query_duration_seconds", Help: "Duration of sharddb queries", }, []string{"query_name", "status"})
Functions ¶
func GetBucketFromRKey ¶
func GetHighestRKeyForBucket ¶
func GetLowestRKeyForBucket ¶
Types ¶
type ShardDB ¶
type ShardDB struct {
// contains filtered or unexported fields
}
func NewShardDB ¶
func (*ShardDB) DeletePost ¶
func (*ShardDB) GetPostMetas ¶
func (s *ShardDB) GetPostMetas(ctx context.Context, bucket, limit int, cursor time.Time) ([]*Post, time.Time, error)
GetPostMetas returns a page of posts without the raw content
Click to show internal directories.
Click to hide internal directories.