coroutinev1

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLength        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	Kind_name = map[int32]string{
		0:  "KIND_UNSPECIFIED",
		1:  "KIND_BOOL",
		2:  "KIND_INT",
		3:  "KIND_INT8",
		4:  "KIND_INT16",
		5:  "KIND_INT32",
		6:  "KIND_INT64",
		7:  "KIND_UINT",
		8:  "KIND_UINT8",
		9:  "KIND_UINT16",
		10: "KIND_UINT32",
		11: "KIND_UINT64",
		12: "KIND_UINTPTR",
		13: "KIND_FLOAT32",
		14: "KIND_FLOAT64",
		15: "KIND_COMPLEX64",
		16: "KIND_COMPLEX128",
		17: "KIND_ARRAY",
		18: "KIND_CHAN",
		19: "KIND_FUNC",
		20: "KIND_INTERFACE",
		21: "KIND_MAP",
		22: "KIND_POINTER",
		23: "KIND_SLICE",
		24: "KIND_STRING",
		25: "KIND_STRUCT",
		26: "KIND_UNSAFE_POINTER",
	}
	Kind_value = map[string]int32{
		"KIND_UNSPECIFIED":    0,
		"KIND_BOOL":           1,
		"KIND_INT":            2,
		"KIND_INT8":           3,
		"KIND_INT16":          4,
		"KIND_INT32":          5,
		"KIND_INT64":          6,
		"KIND_UINT":           7,
		"KIND_UINT8":          8,
		"KIND_UINT16":         9,
		"KIND_UINT32":         10,
		"KIND_UINT64":         11,
		"KIND_UINTPTR":        12,
		"KIND_FLOAT32":        13,
		"KIND_FLOAT64":        14,
		"KIND_COMPLEX64":      15,
		"KIND_COMPLEX128":     16,
		"KIND_ARRAY":          17,
		"KIND_CHAN":           18,
		"KIND_FUNC":           19,
		"KIND_INTERFACE":      20,
		"KIND_MAP":            21,
		"KIND_POINTER":        22,
		"KIND_SLICE":          23,
		"KIND_STRING":         24,
		"KIND_STRUCT":         25,
		"KIND_UNSAFE_POINTER": 26,
	}
)

Enum value maps for Kind.

View Source
var (
	ChanDir_name = map[int32]string{
		0: "CHAN_DIR_UNSPECIFIED",
		1: "CHAN_DIR_RECV",
		2: "CHAN_DIR_SEND",
		3: "CHAN_DIR_BOTH",
	}
	ChanDir_value = map[string]int32{
		"CHAN_DIR_UNSPECIFIED": 0,
		"CHAN_DIR_RECV":        1,
		"CHAN_DIR_SEND":        2,
		"CHAN_DIR_BOTH":        3,
	}
)

Enum value maps for ChanDir.

View Source
var File_coroutine_v1_coroutine_proto protoreflect.FileDescriptor
View Source
var File_coroutine_v1_function_proto protoreflect.FileDescriptor
View Source
var File_coroutine_v1_type_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Build

type Build struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Os   string `protobuf:"bytes,2,opt,name=os,proto3" json:"os,omitempty"`
	Arch string `protobuf:"bytes,3,opt,name=arch,proto3" json:"arch,omitempty"`
	// contains filtered or unexported fields
}

Build is info about the build in which a durable coroutine is/was running.

func (*Build) Descriptor deprecated

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

Deprecated: Use Build.ProtoReflect.Descriptor instead.

func (*Build) GetArch

func (x *Build) GetArch() string

func (*Build) GetId

func (x *Build) GetId() string

func (*Build) GetOs

func (x *Build) GetOs() string

func (*Build) MarshalToSizedBufferVT

func (m *Build) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Build) MarshalToVT

func (m *Build) MarshalToVT(dAtA []byte) (int, error)

func (*Build) MarshalVT

func (m *Build) MarshalVT() (dAtA []byte, err error)

func (*Build) ProtoMessage

func (*Build) ProtoMessage()

func (*Build) ProtoReflect

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

func (*Build) Reset

func (x *Build) Reset()

func (*Build) SizeVT

func (m *Build) SizeVT() (n int)

func (*Build) String

func (x *Build) String() string

func (*Build) UnmarshalVT

func (m *Build) UnmarshalVT(dAtA []byte) error

type ChanDir

type ChanDir int32
const (
	ChanDir_CHAN_DIR_UNSPECIFIED ChanDir = 0
	ChanDir_CHAN_DIR_RECV        ChanDir = 1
	ChanDir_CHAN_DIR_SEND        ChanDir = 2
	ChanDir_CHAN_DIR_BOTH        ChanDir = 3
)

func (ChanDir) Descriptor

func (ChanDir) Descriptor() protoreflect.EnumDescriptor

func (ChanDir) Enum

func (x ChanDir) Enum() *ChanDir

func (ChanDir) EnumDescriptor deprecated

func (ChanDir) EnumDescriptor() ([]byte, []int)

Deprecated: Use ChanDir.Descriptor instead.

func (ChanDir) Number

func (x ChanDir) Number() protoreflect.EnumNumber

func (ChanDir) String

func (x ChanDir) String() string

func (ChanDir) Type

func (ChanDir) Type() protoreflect.EnumType

type Field

type Field struct {

	// Name is the string ID of the name of the field.
	Name uint32 `protobuf:"varint,1,opt,name=name,proto3" json:"name,omitempty"`
	// Package is the string ID of package path that qualifies a lower case
	// (unexported) field name. It is empty for exported field names.
	Package uint32 `protobuf:"varint,2,opt,name=package,proto3" json:"package,omitempty"`
	// Type is the type of the field.
	Type uint32 `protobuf:"varint,3,opt,name=type,proto3" json:"type,omitempty"`
	// Offset is the offset of the field within its struct, in bytes.
	Offset uint64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
	// Index is a sequence used by (reflect.Type).FieldByIndex.
	Index []int32 `protobuf:"varint,5,rep,packed,name=index,proto3" json:"index,omitempty"`
	// Anonymous indicates whether the field is an embedded field (with a name
	// derived from its type).
	Anonymous bool `protobuf:"varint,6,opt,name=anonymous,proto3" json:"anonymous,omitempty"`
	// Tag contains field metadata.
	Tag string `protobuf:"bytes,7,opt,name=tag,proto3" json:"tag,omitempty"`
	// contains filtered or unexported fields
}

func (*Field) Descriptor deprecated

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

Deprecated: Use Field.ProtoReflect.Descriptor instead.

func (*Field) GetAnonymous

func (x *Field) GetAnonymous() bool

func (*Field) GetIndex

func (x *Field) GetIndex() []int32

func (*Field) GetName

func (x *Field) GetName() uint32

func (*Field) GetOffset

func (x *Field) GetOffset() uint64

func (*Field) GetPackage

func (x *Field) GetPackage() uint32

func (*Field) GetTag

func (x *Field) GetTag() string

func (*Field) GetType

func (x *Field) GetType() uint32

func (*Field) MarshalToSizedBufferVT

func (m *Field) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Field) MarshalToVT

func (m *Field) MarshalToVT(dAtA []byte) (int, error)

func (*Field) MarshalVT

func (m *Field) MarshalVT() (dAtA []byte, err error)

func (*Field) ProtoMessage

func (*Field) ProtoMessage()

func (*Field) ProtoReflect

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

func (*Field) Reset

func (x *Field) Reset()

func (*Field) SizeVT

func (m *Field) SizeVT() (n int)

func (*Field) String

func (x *Field) String() string

func (*Field) UnmarshalVT

func (m *Field) UnmarshalVT(dAtA []byte) error

type Function

type Function struct {

	// Name is an identifier for the name of the function.
	Name uint32 `protobuf:"varint,1,opt,name=name,proto3" json:"name,omitempty"`
	// Type is an identifier for the function's type.
	Type uint32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"`
	// Closure is an identifier for a struct type that represents the
	// memory layout of the closure.
	Closure uint32 `protobuf:"varint,3,opt,name=closure,proto3" json:"closure,omitempty"`
	// contains filtered or unexported fields
}

Function represents a function, method or closure in the program.

func (*Function) Descriptor deprecated

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

Deprecated: Use Function.ProtoReflect.Descriptor instead.

func (*Function) GetClosure

func (x *Function) GetClosure() uint32

func (*Function) GetName

func (x *Function) GetName() uint32

func (*Function) GetType

func (x *Function) GetType() uint32

func (*Function) MarshalToSizedBufferVT

func (m *Function) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Function) MarshalToVT

func (m *Function) MarshalToVT(dAtA []byte) (int, error)

func (*Function) MarshalVT

func (m *Function) MarshalVT() (dAtA []byte, err error)

func (*Function) ProtoMessage

func (*Function) ProtoMessage()

func (*Function) ProtoReflect

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

func (*Function) Reset

func (x *Function) Reset()

func (*Function) SizeVT

func (m *Function) SizeVT() (n int)

func (*Function) String

func (x *Function) String() string

func (*Function) UnmarshalVT

func (m *Function) UnmarshalVT(dAtA []byte) error

type Kind

type Kind int32
const (
	Kind_KIND_UNSPECIFIED    Kind = 0
	Kind_KIND_BOOL           Kind = 1
	Kind_KIND_INT            Kind = 2
	Kind_KIND_INT8           Kind = 3
	Kind_KIND_INT16          Kind = 4
	Kind_KIND_INT32          Kind = 5
	Kind_KIND_INT64          Kind = 6
	Kind_KIND_UINT           Kind = 7
	Kind_KIND_UINT8          Kind = 8
	Kind_KIND_UINT16         Kind = 9
	Kind_KIND_UINT32         Kind = 10
	Kind_KIND_UINT64         Kind = 11
	Kind_KIND_UINTPTR        Kind = 12
	Kind_KIND_FLOAT32        Kind = 13
	Kind_KIND_FLOAT64        Kind = 14
	Kind_KIND_COMPLEX64      Kind = 15
	Kind_KIND_COMPLEX128     Kind = 16
	Kind_KIND_ARRAY          Kind = 17
	Kind_KIND_CHAN           Kind = 18
	Kind_KIND_FUNC           Kind = 19
	Kind_KIND_INTERFACE      Kind = 20
	Kind_KIND_MAP            Kind = 21
	Kind_KIND_POINTER        Kind = 22
	Kind_KIND_SLICE          Kind = 23
	Kind_KIND_STRING         Kind = 24
	Kind_KIND_STRUCT         Kind = 25
	Kind_KIND_UNSAFE_POINTER Kind = 26
)

func (Kind) Descriptor

func (Kind) Descriptor() protoreflect.EnumDescriptor

func (Kind) Enum

func (x Kind) Enum() *Kind

func (Kind) EnumDescriptor deprecated

func (Kind) EnumDescriptor() ([]byte, []int)

Deprecated: Use Kind.Descriptor instead.

func (Kind) Number

func (x Kind) Number() protoreflect.EnumNumber

func (Kind) String

func (x Kind) String() string

func (Kind) Type

func (Kind) Type() protoreflect.EnumType

type Region

type Region struct {

	// Type is the type of the region, shifted left by one.
	//
	// The least significant bit indicates that this region represents
	// an array, and that the type is the array element type rather
	// than the object that's encoded in this region.
	Type uint32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
	// Array length, for regions that are arrays.
	ArrayLength uint32 `protobuf:"varint,2,opt,name=array_length,json=arrayLength,proto3" json:"array_length,omitempty"`
	// Data is the encoded contents of the memory region.
	Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

Region is an encoded region of memory.

func (*Region) Descriptor deprecated

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

Deprecated: Use Region.ProtoReflect.Descriptor instead.

func (*Region) GetArrayLength

func (x *Region) GetArrayLength() uint32

func (*Region) GetData

func (x *Region) GetData() []byte

func (*Region) GetType

func (x *Region) GetType() uint32

func (*Region) MarshalToSizedBufferVT

func (m *Region) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Region) MarshalToVT

func (m *Region) MarshalToVT(dAtA []byte) (int, error)

func (*Region) MarshalVT

func (m *Region) MarshalVT() (dAtA []byte, err error)

func (*Region) ProtoMessage

func (*Region) ProtoMessage()

func (*Region) ProtoReflect

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

func (*Region) Reset

func (x *Region) Reset()

func (*Region) SizeVT

func (m *Region) SizeVT() (n int)

func (*Region) String

func (x *Region) String() string

func (*Region) UnmarshalVT

func (m *Region) UnmarshalVT(dAtA []byte) error

type State

type State struct {

	// Build is information about the build in which the coruotine state
	// was generated.
	Build *Build `protobuf:"bytes,1,opt,name=build,proto3" json:"build,omitempty"`
	// State is a serialized representation of the objects in the program
	// that are reachable from the coroutine stack.
	State []byte `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
	// Types is the set of types used by the object graph.
	Types []*Type `protobuf:"bytes,3,rep,name=types,proto3" json:"types,omitempty"`
	// Functions is the set of functions, methods and closures referenced
	// by the object graph.
	Functions []*Function `protobuf:"bytes,4,rep,name=functions,proto3" json:"functions,omitempty"`
	// Regions are encoded regions of memory.
	Regions []*Region `protobuf:"bytes,5,rep,name=regions,proto3" json:"regions,omitempty"`
	// Root is the root object.
	Root *Region `protobuf:"bytes,6,opt,name=root,proto3" json:"root,omitempty"`
	// Strings is the string table.
	Strings []string `protobuf:"bytes,7,rep,name=strings,proto3" json:"strings,omitempty"`
	// contains filtered or unexported fields
}

State is durable coroutine state.

func (*State) Descriptor deprecated

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

Deprecated: Use State.ProtoReflect.Descriptor instead.

func (*State) GetBuild

func (x *State) GetBuild() *Build

func (*State) GetFunctions

func (x *State) GetFunctions() []*Function

func (*State) GetRegions

func (x *State) GetRegions() []*Region

func (*State) GetRoot

func (x *State) GetRoot() *Region

func (*State) GetState

func (x *State) GetState() []byte

func (*State) GetStrings

func (x *State) GetStrings() []string

func (*State) GetTypes

func (x *State) GetTypes() []*Type

func (*State) MarshalToSizedBufferVT

func (m *State) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*State) MarshalToVT

func (m *State) MarshalToVT(dAtA []byte) (int, error)

func (*State) MarshalVT

func (m *State) MarshalVT() (dAtA []byte, err error)

func (*State) ProtoMessage

func (*State) ProtoMessage()

func (*State) ProtoReflect

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

func (*State) Reset

func (x *State) Reset()

func (*State) SizeVT

func (m *State) SizeVT() (n int)

func (*State) String

func (x *State) String() string

func (*State) UnmarshalVT

func (m *State) UnmarshalVT(dAtA []byte) error

type Type

type Type struct {

	// Name is the string ID of the name of the type within the package it was
	// defined.
	Name uint32 `protobuf:"varint,1,opt,name=name,proto3" json:"name,omitempty"`
	// Package is the string ID of the name of the package that defines the type.
	Package uint32 `protobuf:"varint,2,opt,name=package,proto3" json:"package,omitempty"`
	// Kind is the underlying type.
	Kind Kind `protobuf:"varint,3,opt,name=kind,proto3,enum=coroutine.v1.Kind" json:"kind,omitempty"`
	// Elem is the type of an array, slice, pointer, chan, or map's element.
	Elem uint32 `protobuf:"varint,4,opt,name=elem,proto3" json:"elem,omitempty"`
	// Key is the key type for map types.
	Key uint32 `protobuf:"varint,5,opt,name=key,proto3" json:"key,omitempty"`
	// Fields is the set of fields defined in a struct type.
	Fields []*Field `protobuf:"bytes,6,rep,name=fields,proto3" json:"fields,omitempty"`
	// Params are the types of params for a function type.
	Params []uint32 `protobuf:"varint,7,rep,packed,name=params,proto3" json:"params,omitempty"`
	// Results are the types of results for a function type.
	Results []uint32 `protobuf:"varint,8,rep,packed,name=results,proto3" json:"results,omitempty"`
	// Length is the length of an array type.
	Length int64 `protobuf:"varint,9,opt,name=length,proto3" json:"length,omitempty"`
	// MemoryOffset is an optional field that encodes the type's location
	// in memory.
	MemoryOffset uint64 `protobuf:"varint,10,opt,name=memory_offset,json=memoryOffset,proto3" json:"memory_offset,omitempty"`
	// ChanDir is the direction of a channel type.
	ChanDir ChanDir `protobuf:"varint,11,opt,name=chan_dir,json=chanDir,proto3,enum=coroutine.v1.ChanDir" json:"chan_dir,omitempty"`
	// Custom serializer is an identifier for a custom serialization
	// routine registered for this type. A value of zero indicates
	// that no custom serializer has been registered. Types with
	// custom serializers are opaque.
	CustomSerializer uint32 `protobuf:"varint,12,opt,name=custom_serializer,json=customSerializer,proto3" json:"custom_serializer,omitempty"`
	// Variadic is true for function types with a variadic argument.
	Variadic bool `protobuf:"varint,13,opt,name=variadic,proto3" json:"variadic,omitempty"`
	// contains filtered or unexported fields
}

Type is a data type.

Types may reference other types internally (including themselves). To encode the graph of types in a program, a Type is expected to be stored alongside all other Types in an array. The index of each Type in the array becomes its unique identifier, and internal references to other types are simply an int32 index.

func (*Type) Descriptor deprecated

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

Deprecated: Use Type.ProtoReflect.Descriptor instead.

func (*Type) GetChanDir

func (x *Type) GetChanDir() ChanDir

func (*Type) GetCustomSerializer

func (x *Type) GetCustomSerializer() uint32

func (*Type) GetElem

func (x *Type) GetElem() uint32

func (*Type) GetFields

func (x *Type) GetFields() []*Field

func (*Type) GetKey

func (x *Type) GetKey() uint32

func (*Type) GetKind

func (x *Type) GetKind() Kind

func (*Type) GetLength

func (x *Type) GetLength() int64

func (*Type) GetMemoryOffset

func (x *Type) GetMemoryOffset() uint64

func (*Type) GetName

func (x *Type) GetName() uint32

func (*Type) GetPackage

func (x *Type) GetPackage() uint32

func (*Type) GetParams

func (x *Type) GetParams() []uint32

func (*Type) GetResults

func (x *Type) GetResults() []uint32

func (*Type) GetVariadic

func (x *Type) GetVariadic() bool

func (*Type) MarshalToSizedBufferVT

func (m *Type) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Type) MarshalToVT

func (m *Type) MarshalToVT(dAtA []byte) (int, error)

func (*Type) MarshalVT

func (m *Type) MarshalVT() (dAtA []byte, err error)

func (*Type) ProtoMessage

func (*Type) ProtoMessage()

func (*Type) ProtoReflect

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

func (*Type) Reset

func (x *Type) Reset()

func (*Type) SizeVT

func (m *Type) SizeVT() (n int)

func (*Type) String

func (x *Type) String() string

func (*Type) UnmarshalVT

func (m *Type) UnmarshalVT(dAtA []byte) error

Jump to

Keyboard shortcuts

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