internal

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 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 IsCredKey

func IsCredKey(key string) bool

func IsMtzRqKey

func IsMtzRqKey(key string) bool

func IsProjectKey

func IsProjectKey(key string) bool

func IsRlzKey

func IsRlzKey(key string) bool

func IsRlzRqKey

func IsRlzRqKey(key string) bool

func IsUserKey

func IsUserKey(key string) bool

func IsUserStatusKey

func IsUserStatusKey(key string) bool

func IsXDCKey

func IsXDCKey(key string) bool

func IsXdcWgKey

func IsXdcWgKey(key string) bool

func IsXpKey

func IsXpKey(key string) bool

func IsXpRevKey

func IsXpRevKey(key string) bool

func IsXpRevModelKey

func IsXpRevModelKey(key string) bool

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 Cred

type Cred struct {
	User    string
	Type    string // host or user
	Content string // keys or cert
}

type KeyType

type KeyType int
const (
	XpKey KeyType = iota
	XpGitKey
	XpRevKey
	XpRevModelKey
	RlzRqKey
	RlzKey
	MtzRqKey
	UserKey
	UserStatusKey
	ProjectKey
	CredKey
	XDCKey
	XdcWgKey
)

func (KeyType) String

func (kt KeyType) String() string

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

type StatusKey

type StatusKey struct {
	Type        KeyType
	User        string
	Project     string
	Experiment  string
	Realization string
	XDC         string // XDC name
	Cred        Cred
	Status      string // optional status put there by reconcile functions
}

func ParseKey

func ParseKey(key string) *StatusKey

func (*StatusKey) CredKey

func (sk *StatusKey) CredKey() string

func (*StatusKey) GitKey

func (sk *StatusKey) GitKey() string

func (*StatusKey) Key

func (sk *StatusKey) Key() string

func (*StatusKey) MtzRqKey

func (sk *StatusKey) MtzRqKey() string

func (*StatusKey) ProjectKey

func (sk *StatusKey) ProjectKey() string

func (*StatusKey) RevKey

func (sk *StatusKey) RevKey() string

func (*StatusKey) RevModelKey

func (sk *StatusKey) RevModelKey() string

func (*StatusKey) RlzKey

func (sk *StatusKey) RlzKey() string

func (*StatusKey) RlzRqKey

func (sk *StatusKey) RlzRqKey() string

func (*StatusKey) UserKey

func (sk *StatusKey) UserKey() string

func (*StatusKey) UserStatusKey

func (sk *StatusKey) UserStatusKey() string

func (*StatusKey) XDCKey

func (sk *StatusKey) XDCKey() string

func (*StatusKey) XdcWgKey

func (sk *StatusKey) XdcWgKey() string

func (*StatusKey) XpKey

func (sk *StatusKey) XpKey() string

Jump to

Keyboard shortcuts

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