sqlRouter

package
v0.14.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity struct {
	EntityID   string `gorm:"primaryKey"`
	ReplicaSet uint64
	CreatedOn  int64
	EditedOn   int64
}

type Router

type Router struct {
	// contains filtered or unexported fields
}

func New

func New(db *gorm.DB) *Router

func (*Router) Get

func (r *Router) Get(entityID string) (replicaSet uint64, err error)

func (*Router) Set

func (r *Router) Set(entityID string, replicaSet uint64, replace bool) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL