internal

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// GRPCMaxMessageSize is the maximum message size of a grpc message
	// the option is then passed to the grpc client connection, and
	// is set in bytes.
	GRPCMaxMessageSize = 512 * 1024 * 1024
	GRPCMaxMessage     = grpc.WithDefaultCallOptions(
		grpc.MaxCallRecvMsgSize(GRPCMaxMessageSize),
		grpc.MaxCallSendMsgSize(GRPCMaxMessageSize),
	)
	GRPCMaxServer = []grpc.ServerOption{
		grpc.MaxRecvMsgSize(GRPCMaxMessageSize),
		grpc.MaxSendMsgSize(GRPCMaxMessageSize),
	}
)
View Source
var File_internal_internal_proto protoreflect.FileDescriptor

Functions

func InitLogging added in v1.0.1

func InitLogging()

Types

type CountSet

type CountSet struct {
	Name   string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Size   uint64   `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	Values []uint64 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"`
	Offset uint64   `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
	Ver    int64    `protobuf:"varint,5,opt,name=ver,proto3" json:"ver,omitempty"`
	// contains filtered or unexported fields
}

func (CountSet) Add

func (cs CountSet) Add() (uint64, CountSet, error)

Add increments the counter and returns the created index value.

func (*CountSet) Descriptor deprecated

func (*CountSet) Descriptor() ([]byte, []int)

Deprecated: Use CountSet.ProtoReflect.Descriptor instead.

func (*CountSet) GetName

func (x *CountSet) GetName() string

func (*CountSet) GetOffset

func (x *CountSet) GetOffset() uint64

func (*CountSet) GetSize

func (x *CountSet) GetSize() uint64

func (*CountSet) GetValues

func (x *CountSet) GetValues() []uint64

func (*CountSet) GetVer

func (x *CountSet) GetVer() int64

func (*CountSet) GetVersion

func (cs *CountSet) GetVersion() int64

GetVersion returns the current datastore version of the object

func (*CountSet) Id

func (cs *CountSet) Id() string

Id returns the ID for this object

func (*CountSet) Key

func (cs *CountSet) Key() string

Key returns the datastore key for this object.

func (*CountSet) Merge

func (cs *CountSet) Merge(other interface{}) error

func (CountSet) Next

func (cs CountSet) Next() (uint64, uint64)

Next returns the next available index.

func (*CountSet) Object

func (cs *CountSet) Object() interface{}

Value returns this object as an interface{}

func (*CountSet) ProtoMessage

func (*CountSet) ProtoMessage()

func (*CountSet) ProtoReflect

func (x *CountSet) ProtoReflect() protoreflect.Message

func (CountSet) Remove

func (cs CountSet) Remove(i uint64) CountSet

Remove removes an index from the counter, freeing it for future use.

func (*CountSet) Reset

func (x *CountSet) Reset()

func (*CountSet) SetVersion

func (cs *CountSet) SetVersion(v int64)

SetVersion sets the current datastore version of the object

func (*CountSet) String

func (x *CountSet) String() string

func (*CountSet) Validate

func (this *CountSet) Validate() error

type Mzid

type Mzid struct {
	Rid string
	Eid string
	Pid string
}

func MzidFromString

func MzidFromString(mzid string) (*Mzid, error)

type Set

type Set struct {
	Map  map[uint64]struct{}
	Name string
	Ver  int64
}

func NewSet

func NewSet(name string) *Set

create a new set with range [offset, offset+size) in the set

func (Set) AddElement

func (s Set) AddElement(v uint64) error

add an element to the set

func (Set) Contains

func (s Set) Contains(v uint64) bool

check for set membership

func (Set) DelAnyElement

func (s Set) DelAnyElement() (uint64, error)

delete an arbitrary element from the set and return it

func (Set) DelElement

func (s Set) DelElement(v uint64) error

delete a specific element from the set

func (Set) GetAnyElement

func (s Set) GetAnyElement() (uint64, error)

func (Set) Marshal

func (s Set) Marshal() ([]byte, error)

func (Set) Unmarshal

func (s Set) Unmarshal(bytes []byte) error

Jump to

Keyboard shortcuts

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