async

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: GPL-3.0 Imports: 14 Imported by: 5

README

Gorchestrate Go SDK

Usage example: https://github.com/gorchestrate/pizzaapp

Architecture

Using async.Manage your service will publish it's API to Gorchestrate Core and execute new or existing processes. Process is defined as a Go struct with methods, that will be called when process starts/unblocks. On initial run 'Start' method is called.

When method is called it could:

  • execute arbitrary code
  • call other Gorchestrate API's (aka func())
  • specify blocking conditions (aka select{} or)
  • create channels (aka make chan(type))
  • create new threads for existing process (aka go func(){})
  • finish process with result. This will stop execution of the process and unblock all selects aquired by this process

All semantics for operations are similar to Go ones and have same guarantees.

  • Select operation is exlusive and have same linearized consistency guarantees (All events are strictly ordered using HLC clock)
  • You can close channels, create buffered channels, pass channels inside channels.
  • You can have multiple Threads(goroutines) running in your process. They will always be executed(unblocked) exlusively one after another.
  • You can specify <-time.After() conditions in select statement.

All state management is done on Gorchestrate Core side. Process is locked, sent for execution, processed by service and then unlocked.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Case_Op_name = map[int32]string{
	0: "Invalid",
	1: "Send",
	2: "Recv",
	3: "Time",
	5: "Default",
}
View Source
var Case_Op_value = map[string]int32{
	"Invalid": 0,
	"Send":    1,
	"Recv":    2,
	"Time":    3,
	"Default": 5,
}
View Source
var Process_Status_name = map[int32]string{
	0: "Invalid",
	1: "Started",
	2: "Running",
	3: "Finished",
}
View Source
var Process_Status_value = map[string]int32{
	"Invalid":  0,
	"Started":  1,
	"Running":  2,
	"Finished": 3,
}
View Source
var Select_Result_name = map[int32]string{
	0: "Invalid",
	1: "OK",
	2: "Closed",
}
View Source
var Select_Result_value = map[string]int32{
	"Invalid": 0,
	"OK":      1,
	"Closed":  2,
}
View Source
var Thread_Status_name = map[int32]string{
	0: "Invalid",
	1: "Blocked",
	2: "Unblocked",
	3: "Aborted",
}
View Source
var Thread_Status_value = map[string]int32{
	"Invalid":   0,
	"Blocked":   1,
	"Unblocked": 2,
	"Aborted":   3,
}

Functions

func GetFunctionName

func GetFunctionName(i interface{}) string

func Manage

func Manage(ctx context.Context, client RuntimeClient, ss ...Service) error

func RegisterRuntimeServer

func RegisterRuntimeServer(s *grpc.Server, srv RuntimeServer)

Types

type API

type API struct {
	API          *ProcessAPI
	NewProcState func() interface{}
}

type AsyncType

type AsyncType interface {
	Type() *Type
}

type BufData

type BufData struct {
	//string Process     = 1;
	//string Select    = 2;
	//string Group     = 3;
	//string ToStatus  = 4;
	Chan                 string   `protobuf:"bytes,1,opt,name=Chan,proto3" json:"Chan,omitempty"`
	Data                 []byte   `protobuf:"bytes,5,opt,name=Data,proto3" json:"Data,omitempty"`
	Clock                uint64   `protobuf:"varint,6,opt,name=clock,proto3" json:"clock,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BufData) Descriptor

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

func (*BufData) GetChan

func (m *BufData) GetChan() string

func (*BufData) GetClock

func (m *BufData) GetClock() uint64

func (*BufData) GetData

func (m *BufData) GetData() []byte

func (*BufData) ProtoMessage

func (*BufData) ProtoMessage()

func (*BufData) Reset

func (m *BufData) Reset()

func (*BufData) String

func (m *BufData) String() string

func (*BufData) XXX_DiscardUnknown

func (m *BufData) XXX_DiscardUnknown()

func (*BufData) XXX_Marshal

func (m *BufData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BufData) XXX_Merge

func (m *BufData) XXX_Merge(src proto.Message)

func (*BufData) XXX_Size

func (m *BufData) XXX_Size() int

func (*BufData) XXX_Unmarshal

func (m *BufData) XXX_Unmarshal(b []byte) error

type Call

type Call struct {
	Id         string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name       string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Input      []byte `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"`
	InputType  string `protobuf:"bytes,4,opt,name=inputType,proto3" json:"inputType,omitempty"`
	OutputType string `protobuf:"bytes,5,opt,name=outputType,proto3" json:"outputType,omitempty"`
	// filled after unblocked
	Output               []byte   `protobuf:"bytes,6,opt,name=output,proto3" json:"output,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Call) Descriptor

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

func (*Call) GetId

func (m *Call) GetId() string

func (*Call) GetInput

func (m *Call) GetInput() []byte

func (*Call) GetInputType

func (m *Call) GetInputType() string

func (*Call) GetName

func (m *Call) GetName() string

func (*Call) GetOutput

func (m *Call) GetOutput() []byte

func (*Call) GetOutputType

func (m *Call) GetOutputType() string

func (*Call) ProtoMessage

func (*Call) ProtoMessage()

func (*Call) Reset

func (m *Call) Reset()

func (*Call) String

func (m *Call) String() string

func (*Call) XXX_DiscardUnknown

func (m *Call) XXX_DiscardUnknown()

func (*Call) XXX_Marshal

func (m *Call) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Call) XXX_Merge

func (m *Call) XXX_Merge(src proto.Message)

func (*Call) XXX_Size

func (m *Call) XXX_Size() int

func (*Call) XXX_Unmarshal

func (m *Call) XXX_Unmarshal(b []byte) error

type Case

type Case struct {
	ToStatus             string   `protobuf:"bytes,1,opt,name=toStatus,proto3" json:"toStatus,omitempty"`
	Op                   Case_Op  `protobuf:"varint,2,opt,name=op,proto3,enum=async.Case_Op" json:"op,omitempty"`
	Chan                 string   `protobuf:"bytes,3,opt,name=chan,proto3" json:"chan,omitempty"`
	Time                 uint64   `protobuf:"varint,4,opt,name=time,proto3" json:"time,omitempty"`
	Data                 []byte   `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
	DataType             string   `protobuf:"bytes,6,opt,name=dataType,proto3" json:"dataType,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Case) Descriptor

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

func (*Case) GetChan

func (m *Case) GetChan() string

func (*Case) GetData

func (m *Case) GetData() []byte

func (*Case) GetDataType

func (m *Case) GetDataType() string

func (*Case) GetOp

func (m *Case) GetOp() Case_Op

func (*Case) GetTime

func (m *Case) GetTime() uint64

func (*Case) GetToStatus

func (m *Case) GetToStatus() string

func (*Case) ProtoMessage

func (*Case) ProtoMessage()

func (*Case) Reset

func (m *Case) Reset()

func (*Case) String

func (m *Case) String() string

func (*Case) XXX_DiscardUnknown

func (m *Case) XXX_DiscardUnknown()

func (*Case) XXX_Marshal

func (m *Case) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Case) XXX_Merge

func (m *Case) XXX_Merge(src proto.Message)

func (*Case) XXX_Size

func (m *Case) XXX_Size() int

func (*Case) XXX_Unmarshal

func (m *Case) XXX_Unmarshal(b []byte) error

type Case_Op

type Case_Op int32
const (
	Case_Invalid Case_Op = 0
	Case_Send    Case_Op = 1
	Case_Recv    Case_Op = 2
	Case_Time    Case_Op = 3
	Case_Default Case_Op = 5
)

func (Case_Op) EnumDescriptor

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

func (Case_Op) String

func (x Case_Op) String() string

type ChanSelect

type ChanSelect struct {
	BlockedAt            uint64   `protobuf:"varint,1,opt,name=blockedAt,proto3" json:"blockedAt,omitempty"`
	Case                 uint64   `protobuf:"varint,2,opt,name=case,proto3" json:"case,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ChanSelect) Descriptor

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

func (*ChanSelect) GetBlockedAt

func (m *ChanSelect) GetBlockedAt() uint64

func (*ChanSelect) GetCase

func (m *ChanSelect) GetCase() uint64

func (*ChanSelect) ProtoMessage

func (*ChanSelect) ProtoMessage()

func (*ChanSelect) Reset

func (m *ChanSelect) Reset()

func (*ChanSelect) String

func (m *ChanSelect) String() string

func (*ChanSelect) XXX_DiscardUnknown

func (m *ChanSelect) XXX_DiscardUnknown()

func (*ChanSelect) XXX_Marshal

func (m *ChanSelect) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChanSelect) XXX_Merge

func (m *ChanSelect) XXX_Merge(src proto.Message)

func (*ChanSelect) XXX_Size

func (m *ChanSelect) XXX_Size() int

func (*ChanSelect) XXX_Unmarshal

func (m *ChanSelect) XXX_Unmarshal(b []byte) error

type Channel

type Channel struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	DataType             string   `protobuf:"bytes,2,opt,name=dataType,proto3" json:"dataType,omitempty"`
	Closed               bool     `protobuf:"varint,3,opt,name=closed,proto3" json:"closed,omitempty"`
	BufSize              uint64   `protobuf:"varint,4,opt,name=bufSize,proto3" json:"bufSize,omitempty"`
	BufMaxSize           uint64   `protobuf:"varint,5,opt,name=bufMaxSize,proto3" json:"bufMaxSize,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Channel) Descriptor

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

func (*Channel) GetBufMaxSize

func (m *Channel) GetBufMaxSize() uint64

func (*Channel) GetBufSize

func (m *Channel) GetBufSize() uint64

func (*Channel) GetClosed

func (m *Channel) GetClosed() bool

func (*Channel) GetDataType

func (m *Channel) GetDataType() string

func (*Channel) GetId

func (m *Channel) GetId() string

func (*Channel) ProtoMessage

func (*Channel) ProtoMessage()

func (*Channel) Reset

func (m *Channel) Reset()

func (*Channel) String

func (m *Channel) String() string

func (*Channel) XXX_DiscardUnknown

func (m *Channel) XXX_DiscardUnknown()

func (*Channel) XXX_Marshal

func (m *Channel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Channel) XXX_Merge

func (m *Channel) XXX_Merge(src proto.Message)

func (*Channel) XXX_Size

func (m *Channel) XXX_Size() int

func (*Channel) XXX_Unmarshal

func (m *Channel) XXX_Unmarshal(b []byte) error

type CloseChanReq

type CloseChanReq struct {
	Ids                  []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CloseChanReq) Descriptor

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

func (*CloseChanReq) GetIds

func (m *CloseChanReq) GetIds() []string

func (*CloseChanReq) ProtoMessage

func (*CloseChanReq) ProtoMessage()

func (*CloseChanReq) Reset

func (m *CloseChanReq) Reset()

func (*CloseChanReq) String

func (m *CloseChanReq) String() string

func (*CloseChanReq) XXX_DiscardUnknown

func (m *CloseChanReq) XXX_DiscardUnknown()

func (*CloseChanReq) XXX_Marshal

func (m *CloseChanReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CloseChanReq) XXX_Merge

func (m *CloseChanReq) XXX_Merge(src proto.Message)

func (*CloseChanReq) XXX_Size

func (m *CloseChanReq) XXX_Size() int

func (*CloseChanReq) XXX_Unmarshal

func (m *CloseChanReq) XXX_Unmarshal(b []byte) error

type Empty

type Empty struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Empty) Descriptor

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

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

func (*Empty) XXX_DiscardUnknown

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal

func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Empty) XXX_Merge

func (m *Empty) XXX_Merge(src proto.Message)

func (*Empty) XXX_Size

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal

func (m *Empty) XXX_Unmarshal(b []byte) error

type GetProcessReq

type GetProcessReq struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetProcessReq) Descriptor

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

func (*GetProcessReq) GetId

func (m *GetProcessReq) GetId() string

func (*GetProcessReq) ProtoMessage

func (*GetProcessReq) ProtoMessage()

func (*GetProcessReq) Reset

func (m *GetProcessReq) Reset()

func (*GetProcessReq) String

func (m *GetProcessReq) String() string

func (*GetProcessReq) XXX_DiscardUnknown

func (m *GetProcessReq) XXX_DiscardUnknown()

func (*GetProcessReq) XXX_Marshal

func (m *GetProcessReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetProcessReq) XXX_Merge

func (m *GetProcessReq) XXX_Merge(src proto.Message)

func (*GetProcessReq) XXX_Size

func (m *GetProcessReq) XXX_Size() int

func (*GetProcessReq) XXX_Unmarshal

func (m *GetProcessReq) XXX_Unmarshal(b []byte) error

type ListAPIsReq

type ListAPIsReq struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	From                 string   `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
	Limit                uint64   `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListAPIsReq) Descriptor

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

func (*ListAPIsReq) GetFrom

func (m *ListAPIsReq) GetFrom() string

func (*ListAPIsReq) GetId

func (m *ListAPIsReq) GetId() string

func (*ListAPIsReq) GetLimit

func (m *ListAPIsReq) GetLimit() uint64

func (*ListAPIsReq) ProtoMessage

func (*ListAPIsReq) ProtoMessage()

func (*ListAPIsReq) Reset

func (m *ListAPIsReq) Reset()

func (*ListAPIsReq) String

func (m *ListAPIsReq) String() string

func (*ListAPIsReq) XXX_DiscardUnknown

func (m *ListAPIsReq) XXX_DiscardUnknown()

func (*ListAPIsReq) XXX_Marshal

func (m *ListAPIsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListAPIsReq) XXX_Merge

func (m *ListAPIsReq) XXX_Merge(src proto.Message)

func (*ListAPIsReq) XXX_Size

func (m *ListAPIsReq) XXX_Size() int

func (*ListAPIsReq) XXX_Unmarshal

func (m *ListAPIsReq) XXX_Unmarshal(b []byte) error

type ListAPIsResp

type ListAPIsResp struct {
	Apis                 []*ProcessAPI `protobuf:"bytes,1,rep,name=apis,proto3" json:"apis,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*ListAPIsResp) Descriptor

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

func (*ListAPIsResp) GetApis

func (m *ListAPIsResp) GetApis() []*ProcessAPI

func (*ListAPIsResp) ProtoMessage

func (*ListAPIsResp) ProtoMessage()

func (*ListAPIsResp) Reset

func (m *ListAPIsResp) Reset()

func (*ListAPIsResp) String

func (m *ListAPIsResp) String() string

func (*ListAPIsResp) XXX_DiscardUnknown

func (m *ListAPIsResp) XXX_DiscardUnknown()

func (*ListAPIsResp) XXX_Marshal

func (m *ListAPIsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListAPIsResp) XXX_Merge

func (m *ListAPIsResp) XXX_Merge(src proto.Message)

func (*ListAPIsResp) XXX_Size

func (m *ListAPIsResp) XXX_Size() int

func (*ListAPIsResp) XXX_Unmarshal

func (m *ListAPIsResp) XXX_Unmarshal(b []byte) error

type ListChansReq

type ListChansReq struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	From                 string   `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
	Limit                uint64   `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListChansReq) Descriptor

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

func (*ListChansReq) GetFrom

func (m *ListChansReq) GetFrom() string

func (*ListChansReq) GetId

func (m *ListChansReq) GetId() string

func (*ListChansReq) GetLimit

func (m *ListChansReq) GetLimit() uint64

func (*ListChansReq) ProtoMessage

func (*ListChansReq) ProtoMessage()

func (*ListChansReq) Reset

func (m *ListChansReq) Reset()

func (*ListChansReq) String

func (m *ListChansReq) String() string

func (*ListChansReq) XXX_DiscardUnknown

func (m *ListChansReq) XXX_DiscardUnknown()

func (*ListChansReq) XXX_Marshal

func (m *ListChansReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListChansReq) XXX_Merge

func (m *ListChansReq) XXX_Merge(src proto.Message)

func (*ListChansReq) XXX_Size

func (m *ListChansReq) XXX_Size() int

func (*ListChansReq) XXX_Unmarshal

func (m *ListChansReq) XXX_Unmarshal(b []byte) error

type ListChansResp

type ListChansResp struct {
	Chans                []*Channel `protobuf:"bytes,1,rep,name=chans,proto3" json:"chans,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*ListChansResp) Descriptor

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

func (*ListChansResp) GetChans

func (m *ListChansResp) GetChans() []*Channel

func (*ListChansResp) ProtoMessage

func (*ListChansResp) ProtoMessage()

func (*ListChansResp) Reset

func (m *ListChansResp) Reset()

func (*ListChansResp) String

func (m *ListChansResp) String() string

func (*ListChansResp) XXX_DiscardUnknown

func (m *ListChansResp) XXX_DiscardUnknown()

func (*ListChansResp) XXX_Marshal

func (m *ListChansResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListChansResp) XXX_Merge

func (m *ListChansResp) XXX_Merge(src proto.Message)

func (*ListChansResp) XXX_Size

func (m *ListChansResp) XXX_Size() int

func (*ListChansResp) XXX_Unmarshal

func (m *ListChansResp) XXX_Unmarshal(b []byte) error

type ListTypesReq

type ListTypesReq struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	From                 string   `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
	Limit                uint64   `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListTypesReq) Descriptor

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

func (*ListTypesReq) GetFrom

func (m *ListTypesReq) GetFrom() string

func (*ListTypesReq) GetId

func (m *ListTypesReq) GetId() string

func (*ListTypesReq) GetLimit

func (m *ListTypesReq) GetLimit() uint64

func (*ListTypesReq) ProtoMessage

func (*ListTypesReq) ProtoMessage()

func (*ListTypesReq) Reset

func (m *ListTypesReq) Reset()

func (*ListTypesReq) String

func (m *ListTypesReq) String() string

func (*ListTypesReq) XXX_DiscardUnknown

func (m *ListTypesReq) XXX_DiscardUnknown()

func (*ListTypesReq) XXX_Marshal

func (m *ListTypesReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListTypesReq) XXX_Merge

func (m *ListTypesReq) XXX_Merge(src proto.Message)

func (*ListTypesReq) XXX_Size

func (m *ListTypesReq) XXX_Size() int

func (*ListTypesReq) XXX_Unmarshal

func (m *ListTypesReq) XXX_Unmarshal(b []byte) error

type ListTypesResp

type ListTypesResp struct {
	Types                []*Type  `protobuf:"bytes,1,rep,name=types,proto3" json:"types,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListTypesResp) Descriptor

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

func (*ListTypesResp) GetTypes

func (m *ListTypesResp) GetTypes() []*Type

func (*ListTypesResp) ProtoMessage

func (*ListTypesResp) ProtoMessage()

func (*ListTypesResp) Reset

func (m *ListTypesResp) Reset()

func (*ListTypesResp) String

func (m *ListTypesResp) String() string

func (*ListTypesResp) XXX_DiscardUnknown

func (m *ListTypesResp) XXX_DiscardUnknown()

func (*ListTypesResp) XXX_Marshal

func (m *ListTypesResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListTypesResp) XXX_Merge

func (m *ListTypesResp) XXX_Merge(src proto.Message)

func (*ListTypesResp) XXX_Size

func (m *ListTypesResp) XXX_Size() int

func (*ListTypesResp) XXX_Unmarshal

func (m *ListTypesResp) XXX_Unmarshal(b []byte) error

type ListenProcessesUpdatesReq

type ListenProcessesUpdatesReq struct {
	From                 uint64   `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"`
	Service              string   `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListenProcessesUpdatesReq) Descriptor

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

func (*ListenProcessesUpdatesReq) GetFrom

func (m *ListenProcessesUpdatesReq) GetFrom() uint64

func (*ListenProcessesUpdatesReq) GetService

func (m *ListenProcessesUpdatesReq) GetService() string

func (*ListenProcessesUpdatesReq) ProtoMessage

func (*ListenProcessesUpdatesReq) ProtoMessage()

func (*ListenProcessesUpdatesReq) Reset

func (m *ListenProcessesUpdatesReq) Reset()

func (*ListenProcessesUpdatesReq) String

func (m *ListenProcessesUpdatesReq) String() string

func (*ListenProcessesUpdatesReq) XXX_DiscardUnknown

func (m *ListenProcessesUpdatesReq) XXX_DiscardUnknown()

func (*ListenProcessesUpdatesReq) XXX_Marshal

func (m *ListenProcessesUpdatesReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListenProcessesUpdatesReq) XXX_Merge

func (m *ListenProcessesUpdatesReq) XXX_Merge(src proto.Message)

func (*ListenProcessesUpdatesReq) XXX_Size

func (m *ListenProcessesUpdatesReq) XXX_Size() int

func (*ListenProcessesUpdatesReq) XXX_Unmarshal

func (m *ListenProcessesUpdatesReq) XXX_Unmarshal(b []byte) error

type LockProcessReq

type LockProcessReq struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LockProcessReq) Descriptor

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

func (*LockProcessReq) GetId

func (m *LockProcessReq) GetId() string

func (*LockProcessReq) ProtoMessage

func (*LockProcessReq) ProtoMessage()

func (*LockProcessReq) Reset

func (m *LockProcessReq) Reset()

func (*LockProcessReq) String

func (m *LockProcessReq) String() string

func (*LockProcessReq) XXX_DiscardUnknown

func (m *LockProcessReq) XXX_DiscardUnknown()

func (*LockProcessReq) XXX_Marshal

func (m *LockProcessReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LockProcessReq) XXX_Merge

func (m *LockProcessReq) XXX_Merge(src proto.Message)

func (*LockProcessReq) XXX_Size

func (m *LockProcessReq) XXX_Size() int

func (*LockProcessReq) XXX_Unmarshal

func (m *LockProcessReq) XXX_Unmarshal(b []byte) error

type LockedProcess

type LockedProcess struct {
	Process              *Process `protobuf:"bytes,1,opt,name=process,proto3" json:"process,omitempty"`
	Thread               *Thread  `protobuf:"bytes,2,opt,name=thread,proto3" json:"thread,omitempty"`
	LockId               uint64   `protobuf:"varint,3,opt,name=lockId,proto3" json:"lockId,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LockedProcess) Descriptor

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

func (*LockedProcess) GetLockId

func (m *LockedProcess) GetLockId() uint64

func (*LockedProcess) GetProcess

func (m *LockedProcess) GetProcess() *Process

func (*LockedProcess) GetThread

func (m *LockedProcess) GetThread() *Thread

func (*LockedProcess) ProtoMessage

func (*LockedProcess) ProtoMessage()

func (*LockedProcess) Reset

func (m *LockedProcess) Reset()

func (*LockedProcess) String

func (m *LockedProcess) String() string

func (*LockedProcess) XXX_DiscardUnknown

func (m *LockedProcess) XXX_DiscardUnknown()

func (*LockedProcess) XXX_Marshal

func (m *LockedProcess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LockedProcess) XXX_Merge

func (m *LockedProcess) XXX_Merge(src proto.Message)

func (*LockedProcess) XXX_Size

func (m *LockedProcess) XXX_Size() int

func (*LockedProcess) XXX_Unmarshal

func (m *LockedProcess) XXX_Unmarshal(b []byte) error

type MakeChanReq

type MakeChanReq struct {
	Chan                 *Channel `protobuf:"bytes,1,opt,name=chan,proto3" json:"chan,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*MakeChanReq) Descriptor

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

func (*MakeChanReq) GetChan

func (m *MakeChanReq) GetChan() *Channel

func (*MakeChanReq) ProtoMessage

func (*MakeChanReq) ProtoMessage()

func (*MakeChanReq) Reset

func (m *MakeChanReq) Reset()

func (*MakeChanReq) String

func (m *MakeChanReq) String() string

func (*MakeChanReq) XXX_DiscardUnknown

func (m *MakeChanReq) XXX_DiscardUnknown()

func (*MakeChanReq) XXX_Marshal

func (m *MakeChanReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MakeChanReq) XXX_Merge

func (m *MakeChanReq) XXX_Merge(src proto.Message)

func (*MakeChanReq) XXX_Size

func (m *MakeChanReq) XXX_Size() int

func (*MakeChanReq) XXX_Unmarshal

func (m *MakeChanReq) XXX_Unmarshal(b []byte) error

type NewProcessReq

type NewProcessReq struct {
	Call                 *Call    `protobuf:"bytes,1,opt,name=call,proto3" json:"call,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Create new process using template

func (*NewProcessReq) Descriptor

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

func (*NewProcessReq) GetCall

func (m *NewProcessReq) GetCall() *Call

func (*NewProcessReq) ProtoMessage

func (*NewProcessReq) ProtoMessage()

func (*NewProcessReq) Reset

func (m *NewProcessReq) Reset()

func (*NewProcessReq) String

func (m *NewProcessReq) String() string

func (*NewProcessReq) XXX_DiscardUnknown

func (m *NewProcessReq) XXX_DiscardUnknown()

func (*NewProcessReq) XXX_Marshal

func (m *NewProcessReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NewProcessReq) XXX_Merge

func (m *NewProcessReq) XXX_Merge(src proto.Message)

func (*NewProcessReq) XXX_Size

func (m *NewProcessReq) XXX_Size() int

func (*NewProcessReq) XXX_Unmarshal

func (m *NewProcessReq) XXX_Unmarshal(b []byte) error

type P

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

func (*P) After

func (p *P) After(after time.Duration) *P

func (*P) At

func (p *P) At(at time.Time) *P

func (*P) Call

func (p *P) Call(name string, input interface{}) *P

func (*P) Default

func (p *P) Default() *P

func (*P) Finish

func (p *P) Finish(result interface{}) *P

func (*P) Go

func (p *P) Go(id string, f func(p *P))

func (*P) ID

func (p *P) ID() string

func (*P) MakeChan

func (p *P) MakeChan(t *Type, bufsize int) Channel

func (*P) Name

func (p *P) Name() string

Name is a process name (not ID).

func (*P) NewID

func (p *P) NewID() string

func (*P) Recv

func (p *P) Recv(channel Channel) *P

func (*P) Send

func (p *P) Send(channel Channel, data interface{}) *P

func (*P) Service

func (p *P) Service() string

Name is a process name (not ID).

func (*P) To

func (p *P) To(cb interface{}) *P

type Process

type Process struct {
	Id                   string         `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name                 string         `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Service              string         `protobuf:"bytes,3,opt,name=service,proto3" json:"service,omitempty"`
	Status               Process_Status `protobuf:"varint,4,opt,name=status,proto3,enum=async.Process_Status" json:"status,omitempty"`
	Threads              []*Thread      `protobuf:"bytes,5,rep,name=threads,proto3" json:"threads,omitempty"`
	State                []byte         `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"`
	Input                []byte         `protobuf:"bytes,7,opt,name=input,proto3" json:"input,omitempty"`
	Output               []byte         `protobuf:"bytes,8,opt,name=output,proto3" json:"output,omitempty"`
	Version              uint64         `protobuf:"varint,9,opt,name=version,proto3" json:"version,omitempty"`
	UpdatedAt            uint64         `protobuf:"varint,10,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*Process) Descriptor

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

func (*Process) GetId

func (m *Process) GetId() string

func (*Process) GetInput

func (m *Process) GetInput() []byte

func (*Process) GetName

func (m *Process) GetName() string

func (*Process) GetOutput

func (m *Process) GetOutput() []byte

func (*Process) GetService

func (m *Process) GetService() string

func (*Process) GetState

func (m *Process) GetState() []byte

func (*Process) GetStatus

func (m *Process) GetStatus() Process_Status

func (*Process) GetThreads

func (m *Process) GetThreads() []*Thread

func (*Process) GetUpdatedAt

func (m *Process) GetUpdatedAt() uint64

func (*Process) GetVersion

func (m *Process) GetVersion() uint64

func (*Process) HasThread

func (s *Process) HasThread(id string) bool

func (*Process) ProtoMessage

func (*Process) ProtoMessage()

func (*Process) Reset

func (m *Process) Reset()

func (*Process) SetThread

func (s *Process) SetThread(new *Thread) (created bool)

func (*Process) String

func (m *Process) String() string

func (*Process) XXX_DiscardUnknown

func (m *Process) XXX_DiscardUnknown()

func (*Process) XXX_Marshal

func (m *Process) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Process) XXX_Merge

func (m *Process) XXX_Merge(src proto.Message)

func (*Process) XXX_Size

func (m *Process) XXX_Size() int

func (*Process) XXX_Unmarshal

func (m *Process) XXX_Unmarshal(b []byte) error

type ProcessAPI

type ProcessAPI struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description          string   `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Service              string   `protobuf:"bytes,3,opt,name=service,proto3" json:"service,omitempty"`
	Input                string   `protobuf:"bytes,4,opt,name=input,proto3" json:"input,omitempty"`
	Output               string   `protobuf:"bytes,5,opt,name=output,proto3" json:"output,omitempty"`
	State                string   `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ProcessAPI) Descriptor

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

func (*ProcessAPI) GetDescription

func (m *ProcessAPI) GetDescription() string

func (*ProcessAPI) GetInput

func (m *ProcessAPI) GetInput() string

func (*ProcessAPI) GetName

func (m *ProcessAPI) GetName() string

func (*ProcessAPI) GetOutput

func (m *ProcessAPI) GetOutput() string

func (*ProcessAPI) GetService

func (m *ProcessAPI) GetService() string

func (*ProcessAPI) GetState

func (m *ProcessAPI) GetState() string

func (*ProcessAPI) ProtoMessage

func (*ProcessAPI) ProtoMessage()

func (*ProcessAPI) Reset

func (m *ProcessAPI) Reset()

func (*ProcessAPI) String

func (m *ProcessAPI) String() string

func (*ProcessAPI) XXX_DiscardUnknown

func (m *ProcessAPI) XXX_DiscardUnknown()

func (*ProcessAPI) XXX_Marshal

func (m *ProcessAPI) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProcessAPI) XXX_Merge

func (m *ProcessAPI) XXX_Merge(src proto.Message)

func (*ProcessAPI) XXX_Size

func (m *ProcessAPI) XXX_Size() int

func (*ProcessAPI) XXX_Unmarshal

func (m *ProcessAPI) XXX_Unmarshal(b []byte) error

type ProcessEvent

type ProcessEvent struct {
	Process              *Process `protobuf:"bytes,1,opt,name=process,proto3" json:"process,omitempty"`
	Thread               *Thread  `protobuf:"bytes,2,opt,name=thread,proto3" json:"thread,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ProcessEvent) Descriptor

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

func (*ProcessEvent) GetProcess

func (m *ProcessEvent) GetProcess() *Process

func (*ProcessEvent) GetThread

func (m *ProcessEvent) GetThread() *Thread

func (*ProcessEvent) ProtoMessage

func (*ProcessEvent) ProtoMessage()

func (*ProcessEvent) Reset

func (m *ProcessEvent) Reset()

func (*ProcessEvent) String

func (m *ProcessEvent) String() string

func (*ProcessEvent) XXX_DiscardUnknown

func (m *ProcessEvent) XXX_DiscardUnknown()

func (*ProcessEvent) XXX_Marshal

func (m *ProcessEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProcessEvent) XXX_Merge

func (m *ProcessEvent) XXX_Merge(src proto.Message)

func (*ProcessEvent) XXX_Size

func (m *ProcessEvent) XXX_Size() int

func (*ProcessEvent) XXX_Unmarshal

func (m *ProcessEvent) XXX_Unmarshal(b []byte) error

type Process_Status

type Process_Status int32
const (
	Process_Invalid  Process_Status = 0
	Process_Started  Process_Status = 1
	Process_Running  Process_Status = 2
	Process_Finished Process_Status = 3
)

func (Process_Status) EnumDescriptor

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

func (Process_Status) String

func (x Process_Status) String() string

type PutProcessReq

type PutProcessReq struct {
	Process              *Process `protobuf:"bytes,1,opt,name=process,proto3" json:"process,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Create new process directly

func (*PutProcessReq) Descriptor

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

func (*PutProcessReq) GetProcess

func (m *PutProcessReq) GetProcess() *Process

func (*PutProcessReq) ProtoMessage

func (*PutProcessReq) ProtoMessage()

func (*PutProcessReq) Reset

func (m *PutProcessReq) Reset()

func (*PutProcessReq) String

func (m *PutProcessReq) String() string

func (*PutProcessReq) XXX_DiscardUnknown

func (m *PutProcessReq) XXX_DiscardUnknown()

func (*PutProcessReq) XXX_Marshal

func (m *PutProcessReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PutProcessReq) XXX_Merge

func (m *PutProcessReq) XXX_Merge(src proto.Message)

func (*PutProcessReq) XXX_Size

func (m *PutProcessReq) XXX_Size() int

func (*PutProcessReq) XXX_Unmarshal

func (m *PutProcessReq) XXX_Unmarshal(b []byte) error

type RegisterProcessHandlerReq

type RegisterProcessHandlerReq struct {
	Service              string   `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	Pool                 int64    `protobuf:"varint,2,opt,name=pool,proto3" json:"pool,omitempty"`
	PollIntervalMs       int64    `protobuf:"varint,3,opt,name=pollIntervalMs,proto3" json:"pollIntervalMs,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RegisterProcessHandlerReq) Descriptor

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

func (*RegisterProcessHandlerReq) GetPollIntervalMs

func (m *RegisterProcessHandlerReq) GetPollIntervalMs() int64

func (*RegisterProcessHandlerReq) GetPool

func (m *RegisterProcessHandlerReq) GetPool() int64

func (*RegisterProcessHandlerReq) GetService

func (m *RegisterProcessHandlerReq) GetService() string

func (*RegisterProcessHandlerReq) ProtoMessage

func (*RegisterProcessHandlerReq) ProtoMessage()

func (*RegisterProcessHandlerReq) Reset

func (m *RegisterProcessHandlerReq) Reset()

func (*RegisterProcessHandlerReq) String

func (m *RegisterProcessHandlerReq) String() string

func (*RegisterProcessHandlerReq) XXX_DiscardUnknown

func (m *RegisterProcessHandlerReq) XXX_DiscardUnknown()

func (*RegisterProcessHandlerReq) XXX_Marshal

func (m *RegisterProcessHandlerReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RegisterProcessHandlerReq) XXX_Merge

func (m *RegisterProcessHandlerReq) XXX_Merge(src proto.Message)

func (*RegisterProcessHandlerReq) XXX_Size

func (m *RegisterProcessHandlerReq) XXX_Size() int

func (*RegisterProcessHandlerReq) XXX_Unmarshal

func (m *RegisterProcessHandlerReq) XXX_Unmarshal(b []byte) error

type RuntimeClient

type RuntimeClient interface {
	// Get current process
	GetProcess(ctx context.Context, in *GetProcessReq, opts ...grpc.CallOption) (*Process, error)
	NewProcess(ctx context.Context, in *NewProcessReq, opts ...grpc.CallOption) (*Empty, error)
	PutProcess(ctx context.Context, in *PutProcessReq, opts ...grpc.CallOption) (*Empty, error)
	UpdateProcess(ctx context.Context, in *UpdateProcessReq, opts ...grpc.CallOption) (*Empty, error)
	LockProcess(ctx context.Context, in *LockProcessReq, opts ...grpc.CallOption) (*LockedProcess, error)
	MakeChan(ctx context.Context, in *MakeChanReq, opts ...grpc.CallOption) (*Empty, error)
	ListChans(ctx context.Context, in *ListChansReq, opts ...grpc.CallOption) (*ListChansResp, error)
	CloseChan(ctx context.Context, in *CloseChanReq, opts ...grpc.CallOption) (*Empty, error)
	PutType(ctx context.Context, in *Type, opts ...grpc.CallOption) (*Empty, error)
	ListTypes(ctx context.Context, in *ListTypesReq, opts ...grpc.CallOption) (*ListTypesResp, error)
	PutAPI(ctx context.Context, in *ProcessAPI, opts ...grpc.CallOption) (*Empty, error)
	ListAPIs(ctx context.Context, in *ListAPIsReq, opts ...grpc.CallOption) (*ListAPIsResp, error)
	// Listen for unblocked states, process events and return updated states.
	RegisterProcessHandler(ctx context.Context, in *RegisterProcessHandlerReq, opts ...grpc.CallOption) (Runtime_RegisterProcessHandlerClient, error)
	// Listen for updates states. You can use this to sync data with other DB's, for ex. Search / Reports / etc.
	ListenProcessesUpdates(ctx context.Context, in *ListenProcessesUpdatesReq, opts ...grpc.CallOption) (Runtime_ListenProcessesUpdatesClient, error)
}

RuntimeClient is the client API for Runtime service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewRuntimeClient

func NewRuntimeClient(cc *grpc.ClientConn) RuntimeClient

type RuntimeServer

type RuntimeServer interface {
	// Get current process
	GetProcess(context.Context, *GetProcessReq) (*Process, error)
	NewProcess(context.Context, *NewProcessReq) (*Empty, error)
	PutProcess(context.Context, *PutProcessReq) (*Empty, error)
	UpdateProcess(context.Context, *UpdateProcessReq) (*Empty, error)
	LockProcess(context.Context, *LockProcessReq) (*LockedProcess, error)
	MakeChan(context.Context, *MakeChanReq) (*Empty, error)
	ListChans(context.Context, *ListChansReq) (*ListChansResp, error)
	CloseChan(context.Context, *CloseChanReq) (*Empty, error)
	PutType(context.Context, *Type) (*Empty, error)
	ListTypes(context.Context, *ListTypesReq) (*ListTypesResp, error)
	PutAPI(context.Context, *ProcessAPI) (*Empty, error)
	ListAPIs(context.Context, *ListAPIsReq) (*ListAPIsResp, error)
	// Listen for unblocked states, process events and return updated states.
	RegisterProcessHandler(*RegisterProcessHandlerReq, Runtime_RegisterProcessHandlerServer) error
	// Listen for updates states. You can use this to sync data with other DB's, for ex. Search / Reports / etc.
	ListenProcessesUpdates(*ListenProcessesUpdatesReq, Runtime_ListenProcessesUpdatesServer) error
}

RuntimeServer is the server API for Runtime service.

type Runtime_ListenProcessesUpdatesClient

type Runtime_ListenProcessesUpdatesClient interface {
	Recv() (*ProcessEvent, error)
	grpc.ClientStream
}

type Runtime_ListenProcessesUpdatesServer

type Runtime_ListenProcessesUpdatesServer interface {
	Send(*ProcessEvent) error
	grpc.ServerStream
}

type Runtime_RegisterProcessHandlerClient

type Runtime_RegisterProcessHandlerClient interface {
	Recv() (*LockedProcess, error)
	grpc.ClientStream
}

type Runtime_RegisterProcessHandlerServer

type Runtime_RegisterProcessHandlerServer interface {
	Send(*LockedProcess) error
	grpc.ServerStream
}

type Select

type Select struct {
	Cases []*Case `protobuf:"bytes,1,rep,name=cases,proto3" json:"cases,omitempty"`
	// filled after unblocked
	UnblockedCase        uint64        `protobuf:"varint,2,opt,name=unblockedCase,proto3" json:"unblockedCase,omitempty"`
	RecvData             []byte        `protobuf:"bytes,3,opt,name=recvData,proto3" json:"recvData,omitempty"`
	Result               Select_Result `protobuf:"varint,4,opt,name=result,proto3,enum=async.Select_Result" json:"result,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*Select) Descriptor

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

func (*Select) GetCases

func (m *Select) GetCases() []*Case

func (*Select) GetRecvData

func (m *Select) GetRecvData() []byte

func (*Select) GetResult

func (m *Select) GetResult() Select_Result

func (*Select) GetUnblockedCase

func (m *Select) GetUnblockedCase() uint64

func (*Select) ProtoMessage

func (*Select) ProtoMessage()

func (*Select) Reset

func (m *Select) Reset()

func (*Select) String

func (m *Select) String() string

func (*Select) XXX_DiscardUnknown

func (m *Select) XXX_DiscardUnknown()

func (*Select) XXX_Marshal

func (m *Select) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Select) XXX_Merge

func (m *Select) XXX_Merge(src proto.Message)

func (*Select) XXX_Size

func (m *Select) XXX_Size() int

func (*Select) XXX_Unmarshal

func (m *Select) XXX_Unmarshal(b []byte) error

type Select_Result

type Select_Result int32
const (
	Select_Invalid Select_Result = 0
	Select_OK      Select_Result = 1
	Select_Closed  Select_Result = 2
)

func (Select_Result) EnumDescriptor

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

func (Select_Result) String

func (x Select_Result) String() string

type Service

type Service struct {
	Name         string
	Types        []*Type
	APIs         []API
	Init         func(ctx context.Context) error
	SingletonRun func(ctx context.Context, c RuntimeClient) error
}

type Thread

type Thread struct {
	Id          string        `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Process     string        `protobuf:"bytes,2,opt,name=process,proto3" json:"process,omitempty"`
	Service     string        `protobuf:"bytes,4,opt,name=service,proto3" json:"service,omitempty"`
	Status      Thread_Status `protobuf:"varint,6,opt,name=status,proto3,enum=async.Thread_Status" json:"status,omitempty"`
	Select      *Select       `protobuf:"bytes,5,opt,name=select,proto3" json:"select,omitempty"`
	Call        *Call         `protobuf:"bytes,12,opt,name=call,proto3" json:"call,omitempty"`
	BlockedAt   uint64        `protobuf:"varint,8,opt,name=blockedAt,proto3" json:"blockedAt,omitempty"`
	UnblockedAt uint64        `protobuf:"varint,9,opt,name=unblockedAt,proto3" json:"unblockedAt,omitempty"`
	// filled after unblocked
	ToStatus             string   `protobuf:"bytes,13,opt,name=toStatus,proto3" json:"toStatus,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Thread) Descriptor

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

func (*Thread) GetBlockedAt

func (m *Thread) GetBlockedAt() uint64

func (*Thread) GetCall

func (m *Thread) GetCall() *Call

func (*Thread) GetId

func (m *Thread) GetId() string

func (*Thread) GetProcess

func (m *Thread) GetProcess() string

func (*Thread) GetSelect

func (m *Thread) GetSelect() *Select

func (*Thread) GetService

func (m *Thread) GetService() string

func (*Thread) GetStatus

func (m *Thread) GetStatus() Thread_Status

func (*Thread) GetToStatus

func (m *Thread) GetToStatus() string

func (*Thread) GetUnblockedAt

func (m *Thread) GetUnblockedAt() uint64

func (*Thread) ProtoMessage

func (*Thread) ProtoMessage()

func (*Thread) Reset

func (m *Thread) Reset()

func (*Thread) String

func (m *Thread) String() string

func (*Thread) XXX_DiscardUnknown

func (m *Thread) XXX_DiscardUnknown()

func (*Thread) XXX_Marshal

func (m *Thread) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Thread) XXX_Merge

func (m *Thread) XXX_Merge(src proto.Message)

func (*Thread) XXX_Size

func (m *Thread) XXX_Size() int

func (*Thread) XXX_Unmarshal

func (m *Thread) XXX_Unmarshal(b []byte) error

type Thread_Status

type Thread_Status int32
const (
	Thread_Invalid   Thread_Status = 0
	Thread_Blocked   Thread_Status = 1
	Thread_Unblocked Thread_Status = 2
	Thread_Aborted   Thread_Status = 3
)

func (Thread_Status) EnumDescriptor

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

func (Thread_Status) String

func (x Thread_Status) String() string

type Time

type Time struct {
	time.Time
}

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(data []byte) error

type Type

type Type struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Description          string   `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	JsonSchema           []byte   `protobuf:"bytes,3,opt,name=jsonSchema,proto3" json:"jsonSchema,omitempty"`
	Version              uint64   `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func ReflectType

func ReflectType(name string, t interface{}) *Type

func (*Type) Descriptor

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

func (*Type) GetDescription

func (m *Type) GetDescription() string

func (*Type) GetId

func (m *Type) GetId() string

func (*Type) GetJsonSchema

func (m *Type) GetJsonSchema() []byte

func (*Type) GetVersion

func (m *Type) GetVersion() uint64

func (*Type) ProtoMessage

func (*Type) ProtoMessage()

func (*Type) Reset

func (m *Type) Reset()

func (*Type) String

func (m *Type) String() string

func (*Type) XXX_DiscardUnknown

func (m *Type) XXX_DiscardUnknown()

func (*Type) XXX_Marshal

func (m *Type) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Type) XXX_Merge

func (m *Type) XXX_Merge(src proto.Message)

func (*Type) XXX_Size

func (m *Type) XXX_Size() int

func (*Type) XXX_Unmarshal

func (m *Type) XXX_Unmarshal(b []byte) error

type UpdateProcessReq

type UpdateProcessReq struct {
	Process              *Process `protobuf:"bytes,1,opt,name=process,proto3" json:"process,omitempty"`
	LockId               uint64   `protobuf:"varint,2,opt,name=lockId,proto3" json:"lockId,omitempty"`
	UnblockedAt          uint64   `protobuf:"varint,3,opt,name=unblockedAt,proto3" json:"unblockedAt,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Update existing process

func (*UpdateProcessReq) Descriptor

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

func (*UpdateProcessReq) GetLockId

func (m *UpdateProcessReq) GetLockId() uint64

func (*UpdateProcessReq) GetProcess

func (m *UpdateProcessReq) GetProcess() *Process

func (*UpdateProcessReq) GetUnblockedAt

func (m *UpdateProcessReq) GetUnblockedAt() uint64

func (*UpdateProcessReq) ProtoMessage

func (*UpdateProcessReq) ProtoMessage()

func (*UpdateProcessReq) Reset

func (m *UpdateProcessReq) Reset()

func (*UpdateProcessReq) String

func (m *UpdateProcessReq) String() string

func (*UpdateProcessReq) XXX_DiscardUnknown

func (m *UpdateProcessReq) XXX_DiscardUnknown()

func (*UpdateProcessReq) XXX_Marshal

func (m *UpdateProcessReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UpdateProcessReq) XXX_Merge

func (m *UpdateProcessReq) XXX_Merge(src proto.Message)

func (*UpdateProcessReq) XXX_Size

func (m *UpdateProcessReq) XXX_Size() int

func (*UpdateProcessReq) XXX_Unmarshal

func (m *UpdateProcessReq) XXX_Unmarshal(b []byte) error

type WaitCallIndex

type WaitCallIndex struct {
	BlockedAt            uint64   `protobuf:"varint,1,opt,name=blockedAt,proto3" json:"blockedAt,omitempty"`
	ProcessesId          string   `protobuf:"bytes,2,opt,name=processesId,proto3" json:"processesId,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*WaitCallIndex) Descriptor

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

func (*WaitCallIndex) GetBlockedAt

func (m *WaitCallIndex) GetBlockedAt() uint64

func (*WaitCallIndex) GetProcessesId

func (m *WaitCallIndex) GetProcessesId() string

func (*WaitCallIndex) ProtoMessage

func (*WaitCallIndex) ProtoMessage()

func (*WaitCallIndex) Reset

func (m *WaitCallIndex) Reset()

func (*WaitCallIndex) String

func (m *WaitCallIndex) String() string

func (*WaitCallIndex) XXX_DiscardUnknown

func (m *WaitCallIndex) XXX_DiscardUnknown()

func (*WaitCallIndex) XXX_Marshal

func (m *WaitCallIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WaitCallIndex) XXX_Merge

func (m *WaitCallIndex) XXX_Merge(src proto.Message)

func (*WaitCallIndex) XXX_Size

func (m *WaitCallIndex) XXX_Size() int

func (*WaitCallIndex) XXX_Unmarshal

func (m *WaitCallIndex) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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