Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchOption ¶
type BatchOption[A, B any] struct { Ctx context.Context TargetKeys []string VersionIDs []string VersionNumbers []uint64 //SyncLimit int Versions func(ctx context.Context, dIds []string, versions []uint64, limits []int) (map[string]*model.VersionLog, error) CacheMaxVersions func(ctx context.Context, dIds []string) (map[string]*model.VersionLog, error) Find func(ctx context.Context, dId string, ids []string) (A, error) Resp func(versionsMap map[string]*model.VersionLog, deleteIdsMap map[string][]string, insertListMap, updateListMap map[string]A, fullMap map[string]bool) *B }
func (*BatchOption[A, B]) Build ¶
func (o *BatchOption[A, B]) Build() (*B, error)
type Option ¶
type Option[A, B any] struct { Ctx context.Context VersionKey string VersionID string VersionNumber uint64 //SyncLimit int CacheMaxVersion func(ctx context.Context, dId string) (*model.VersionLog, error) Version func(ctx context.Context, dId string, version uint, limit int) (*model.VersionLog, error) //SortID func(ctx context.Context, dId string) ([]string, error) Find func(ctx context.Context, ids []string) ([]A, error) Resp func(version *model.VersionLog, deleteIds []string, insertList, updateList []A, full bool) *B }
Click to show internal directories.
Click to hide internal directories.