async

package module
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 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 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,
}
View Source
var Workflow_Status_name = map[int32]string{
	0: "Invalid",
	1: "Started",
	2: "Running",
	3: "Finished",
}
View Source
var Workflow_Status_value = map[string]int32{
	"Invalid":  0,
	"Started":  1,
	"Running":  2,
	"Finished": 3,
}

Functions

func GetFunctionName

func GetFunctionName(i interface{}) string

func ManageWorkflows added in v0.3.4

func ManageWorkflows(ctx context.Context, client RuntimeClient, s Service) error

func RegisterRuntimeServer

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

func Setup added in v0.3.4

func Setup(ctx context.Context, client RuntimeClient, s Service) error

Types

type AsyncType

type AsyncType interface {
	Type() *Type
}

type BufData

type BufData struct {
	//string Workflow     = 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=core.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 DeleteChanReq added in v0.2.0

type DeleteChanReq 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 (*DeleteChanReq) Descriptor added in v0.2.0

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

func (*DeleteChanReq) GetIds added in v0.2.0

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

func (*DeleteChanReq) ProtoMessage added in v0.2.0

func (*DeleteChanReq) ProtoMessage()

func (*DeleteChanReq) Reset added in v0.2.0

func (m *DeleteChanReq) Reset()

func (*DeleteChanReq) String added in v0.2.0

func (m *DeleteChanReq) String() string

func (*DeleteChanReq) XXX_DiscardUnknown added in v0.2.0

func (m *DeleteChanReq) XXX_DiscardUnknown()

func (*DeleteChanReq) XXX_Marshal added in v0.2.0

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

func (*DeleteChanReq) XXX_Merge added in v0.2.0

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

func (*DeleteChanReq) XXX_Size added in v0.2.0

func (m *DeleteChanReq) XXX_Size() int

func (*DeleteChanReq) XXX_Unmarshal added in v0.2.0

func (m *DeleteChanReq) 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 FindWorkflowsReq added in v0.2.0

type FindWorkflowsReq struct {
	From                 uint64   `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"`
	To                   uint64   `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"`
	Limit                uint64   `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	Scanlimit            uint64   `protobuf:"varint,5,opt,name=scanlimit,proto3" json:"scanlimit,omitempty"`
	Filter               string   `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*FindWorkflowsReq) Descriptor added in v0.2.0

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

func (*FindWorkflowsReq) GetFilter added in v0.2.0

func (m *FindWorkflowsReq) GetFilter() string

func (*FindWorkflowsReq) GetFrom added in v0.2.0

func (m *FindWorkflowsReq) GetFrom() uint64

func (*FindWorkflowsReq) GetLimit added in v0.2.0

func (m *FindWorkflowsReq) GetLimit() uint64

func (*FindWorkflowsReq) GetScanlimit added in v0.2.0

func (m *FindWorkflowsReq) GetScanlimit() uint64

func (*FindWorkflowsReq) GetTo added in v0.2.0

func (m *FindWorkflowsReq) GetTo() uint64

func (*FindWorkflowsReq) ProtoMessage added in v0.2.0

func (*FindWorkflowsReq) ProtoMessage()

func (*FindWorkflowsReq) Reset added in v0.2.0

func (m *FindWorkflowsReq) Reset()

func (*FindWorkflowsReq) String added in v0.2.0

func (m *FindWorkflowsReq) String() string

func (*FindWorkflowsReq) XXX_DiscardUnknown added in v0.2.0

func (m *FindWorkflowsReq) XXX_DiscardUnknown()

func (*FindWorkflowsReq) XXX_Marshal added in v0.2.0

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

func (*FindWorkflowsReq) XXX_Merge added in v0.2.0

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

func (*FindWorkflowsReq) XXX_Size added in v0.2.0

func (m *FindWorkflowsReq) XXX_Size() int

func (*FindWorkflowsReq) XXX_Unmarshal added in v0.2.0

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

type FindWorkflowsResp added in v0.2.0

type FindWorkflowsResp struct {
	Workflows            []*Workflow `protobuf:"bytes,1,rep,name=workflows,proto3" json:"workflows,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*FindWorkflowsResp) Descriptor added in v0.2.0

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

func (*FindWorkflowsResp) GetWorkflows added in v0.2.0

func (m *FindWorkflowsResp) GetWorkflows() []*Workflow

func (*FindWorkflowsResp) ProtoMessage added in v0.2.0

func (*FindWorkflowsResp) ProtoMessage()

func (*FindWorkflowsResp) Reset added in v0.2.0

func (m *FindWorkflowsResp) Reset()

func (*FindWorkflowsResp) String added in v0.2.0

func (m *FindWorkflowsResp) String() string

func (*FindWorkflowsResp) XXX_DiscardUnknown added in v0.2.0

func (m *FindWorkflowsResp) XXX_DiscardUnknown()

func (*FindWorkflowsResp) XXX_Marshal added in v0.2.0

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

func (*FindWorkflowsResp) XXX_Merge added in v0.2.0

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

func (*FindWorkflowsResp) XXX_Size added in v0.2.0

func (m *FindWorkflowsResp) XXX_Size() int

func (*FindWorkflowsResp) XXX_Unmarshal added in v0.2.0

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

type GetWorkflowReq added in v0.2.0

type GetWorkflowReq 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 (*GetWorkflowReq) Descriptor added in v0.2.0

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

func (*GetWorkflowReq) GetId added in v0.2.0

func (m *GetWorkflowReq) GetId() string

func (*GetWorkflowReq) ProtoMessage added in v0.2.0

func (*GetWorkflowReq) ProtoMessage()

func (*GetWorkflowReq) Reset added in v0.2.0

func (m *GetWorkflowReq) Reset()

func (*GetWorkflowReq) String added in v0.2.0

func (m *GetWorkflowReq) String() string

func (*GetWorkflowReq) XXX_DiscardUnknown added in v0.2.0

func (m *GetWorkflowReq) XXX_DiscardUnknown()

func (*GetWorkflowReq) XXX_Marshal added in v0.2.0

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

func (*GetWorkflowReq) XXX_Merge added in v0.2.0

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

func (*GetWorkflowReq) XXX_Size added in v0.2.0

func (m *GetWorkflowReq) XXX_Size() int

func (*GetWorkflowReq) XXX_Unmarshal added in v0.2.0

func (m *GetWorkflowReq) 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 ListWorkflowAPIsReq added in v0.3.3

type ListWorkflowAPIsReq 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 (*ListWorkflowAPIsReq) Descriptor added in v0.3.3

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

func (*ListWorkflowAPIsReq) GetFrom added in v0.3.3

func (m *ListWorkflowAPIsReq) GetFrom() string

func (*ListWorkflowAPIsReq) GetId added in v0.3.3

func (m *ListWorkflowAPIsReq) GetId() string

func (*ListWorkflowAPIsReq) GetLimit added in v0.3.3

func (m *ListWorkflowAPIsReq) GetLimit() uint64

func (*ListWorkflowAPIsReq) ProtoMessage added in v0.3.3

func (*ListWorkflowAPIsReq) ProtoMessage()

func (*ListWorkflowAPIsReq) Reset added in v0.3.3

func (m *ListWorkflowAPIsReq) Reset()

func (*ListWorkflowAPIsReq) String added in v0.3.3

func (m *ListWorkflowAPIsReq) String() string

func (*ListWorkflowAPIsReq) XXX_DiscardUnknown added in v0.3.3

func (m *ListWorkflowAPIsReq) XXX_DiscardUnknown()

func (*ListWorkflowAPIsReq) XXX_Marshal added in v0.3.3

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

func (*ListWorkflowAPIsReq) XXX_Merge added in v0.3.3

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

func (*ListWorkflowAPIsReq) XXX_Size added in v0.3.3

func (m *ListWorkflowAPIsReq) XXX_Size() int

func (*ListWorkflowAPIsReq) XXX_Unmarshal added in v0.3.3

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

type ListWorkflowAPIsResp added in v0.3.3

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

func (*ListWorkflowAPIsResp) Descriptor added in v0.3.3

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

func (*ListWorkflowAPIsResp) GetApis added in v0.3.3

func (m *ListWorkflowAPIsResp) GetApis() []*WorkflowAPI

func (*ListWorkflowAPIsResp) ProtoMessage added in v0.3.3

func (*ListWorkflowAPIsResp) ProtoMessage()

func (*ListWorkflowAPIsResp) Reset added in v0.3.3

func (m *ListWorkflowAPIsResp) Reset()

func (*ListWorkflowAPIsResp) String added in v0.3.3

func (m *ListWorkflowAPIsResp) String() string

func (*ListWorkflowAPIsResp) XXX_DiscardUnknown added in v0.3.3

func (m *ListWorkflowAPIsResp) XXX_DiscardUnknown()

func (*ListWorkflowAPIsResp) XXX_Marshal added in v0.3.3

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

func (*ListWorkflowAPIsResp) XXX_Merge added in v0.3.3

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

func (*ListWorkflowAPIsResp) XXX_Size added in v0.3.3

func (m *ListWorkflowAPIsResp) XXX_Size() int

func (*ListWorkflowAPIsResp) XXX_Unmarshal added in v0.3.3

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

type ListenWorkflowsUpdatesReq added in v0.2.0

type ListenWorkflowsUpdatesReq struct {
	From                 uint64   `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"`
	Filter               string   `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListenWorkflowsUpdatesReq) Descriptor added in v0.2.0

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

func (*ListenWorkflowsUpdatesReq) GetFilter added in v0.2.0

func (m *ListenWorkflowsUpdatesReq) GetFilter() string

func (*ListenWorkflowsUpdatesReq) GetFrom added in v0.2.0

func (m *ListenWorkflowsUpdatesReq) GetFrom() uint64

func (*ListenWorkflowsUpdatesReq) ProtoMessage added in v0.2.0

func (*ListenWorkflowsUpdatesReq) ProtoMessage()

func (*ListenWorkflowsUpdatesReq) Reset added in v0.2.0

func (m *ListenWorkflowsUpdatesReq) Reset()

func (*ListenWorkflowsUpdatesReq) String added in v0.2.0

func (m *ListenWorkflowsUpdatesReq) String() string

func (*ListenWorkflowsUpdatesReq) XXX_DiscardUnknown added in v0.2.0

func (m *ListenWorkflowsUpdatesReq) XXX_DiscardUnknown()

func (*ListenWorkflowsUpdatesReq) XXX_Marshal added in v0.2.0

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

func (*ListenWorkflowsUpdatesReq) XXX_Merge added in v0.2.0

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

func (*ListenWorkflowsUpdatesReq) XXX_Size added in v0.2.0

func (m *ListenWorkflowsUpdatesReq) XXX_Size() int

func (*ListenWorkflowsUpdatesReq) XXX_Unmarshal added in v0.2.0

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

type LockWorkflowReq added in v0.2.0

type LockWorkflowReq 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 (*LockWorkflowReq) Descriptor added in v0.2.0

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

func (*LockWorkflowReq) GetId added in v0.2.0

func (m *LockWorkflowReq) GetId() string

func (*LockWorkflowReq) ProtoMessage added in v0.2.0

func (*LockWorkflowReq) ProtoMessage()

func (*LockWorkflowReq) Reset added in v0.2.0

func (m *LockWorkflowReq) Reset()

func (*LockWorkflowReq) String added in v0.2.0

func (m *LockWorkflowReq) String() string

func (*LockWorkflowReq) XXX_DiscardUnknown added in v0.2.0

func (m *LockWorkflowReq) XXX_DiscardUnknown()

func (*LockWorkflowReq) XXX_Marshal added in v0.2.0

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

func (*LockWorkflowReq) XXX_Merge added in v0.2.0

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

func (*LockWorkflowReq) XXX_Size added in v0.2.0

func (m *LockWorkflowReq) XXX_Size() int

func (*LockWorkflowReq) XXX_Unmarshal added in v0.2.0

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

type LockedWorkflow added in v0.2.0

type LockedWorkflow struct {
	Workflow             *Workflow `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,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 (*LockedWorkflow) Descriptor added in v0.2.0

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

func (*LockedWorkflow) GetLockId added in v0.2.0

func (m *LockedWorkflow) GetLockId() uint64

func (*LockedWorkflow) GetThread added in v0.2.0

func (m *LockedWorkflow) GetThread() *Thread

func (*LockedWorkflow) GetWorkflow added in v0.2.0

func (m *LockedWorkflow) GetWorkflow() *Workflow

func (*LockedWorkflow) ProtoMessage added in v0.2.0

func (*LockedWorkflow) ProtoMessage()

func (*LockedWorkflow) Reset added in v0.2.0

func (m *LockedWorkflow) Reset()

func (*LockedWorkflow) String added in v0.2.0

func (m *LockedWorkflow) String() string

func (*LockedWorkflow) XXX_DiscardUnknown added in v0.2.0

func (m *LockedWorkflow) XXX_DiscardUnknown()

func (*LockedWorkflow) XXX_Marshal added in v0.2.0

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

func (*LockedWorkflow) XXX_Merge added in v0.2.0

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

func (*LockedWorkflow) XXX_Size added in v0.2.0

func (m *LockedWorkflow) XXX_Size() int

func (*LockedWorkflow) XXX_Unmarshal added in v0.2.0

func (m *LockedWorkflow) 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 NewWorkflowReq added in v0.2.0

type NewWorkflowReq 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 workflow using template

func (*NewWorkflowReq) Descriptor added in v0.2.0

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

func (*NewWorkflowReq) GetCall added in v0.2.0

func (m *NewWorkflowReq) GetCall() *Call

func (*NewWorkflowReq) ProtoMessage added in v0.2.0

func (*NewWorkflowReq) ProtoMessage()

func (*NewWorkflowReq) Reset added in v0.2.0

func (m *NewWorkflowReq) Reset()

func (*NewWorkflowReq) String added in v0.2.0

func (m *NewWorkflowReq) String() string

func (*NewWorkflowReq) XXX_DiscardUnknown added in v0.2.0

func (m *NewWorkflowReq) XXX_DiscardUnknown()

func (*NewWorkflowReq) XXX_Marshal added in v0.2.0

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

func (*NewWorkflowReq) XXX_Merge added in v0.2.0

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

func (*NewWorkflowReq) XXX_Size added in v0.2.0

func (m *NewWorkflowReq) XXX_Size() int

func (*NewWorkflowReq) XXX_Unmarshal added in v0.2.0

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

type RegisterWorkflowHandlerReq added in v0.2.0

type RegisterWorkflowHandlerReq 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 (*RegisterWorkflowHandlerReq) Descriptor added in v0.2.0

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

func (*RegisterWorkflowHandlerReq) GetPollIntervalMs added in v0.2.0

func (m *RegisterWorkflowHandlerReq) GetPollIntervalMs() int64

func (*RegisterWorkflowHandlerReq) GetPool added in v0.2.0

func (m *RegisterWorkflowHandlerReq) GetPool() int64

func (*RegisterWorkflowHandlerReq) GetService added in v0.2.0

func (m *RegisterWorkflowHandlerReq) GetService() string

func (*RegisterWorkflowHandlerReq) ProtoMessage added in v0.2.0

func (*RegisterWorkflowHandlerReq) ProtoMessage()

func (*RegisterWorkflowHandlerReq) Reset added in v0.2.0

func (m *RegisterWorkflowHandlerReq) Reset()

func (*RegisterWorkflowHandlerReq) String added in v0.2.0

func (m *RegisterWorkflowHandlerReq) String() string

func (*RegisterWorkflowHandlerReq) XXX_DiscardUnknown added in v0.2.0

func (m *RegisterWorkflowHandlerReq) XXX_DiscardUnknown()

func (*RegisterWorkflowHandlerReq) XXX_Marshal added in v0.2.0

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

func (*RegisterWorkflowHandlerReq) XXX_Merge added in v0.2.0

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

func (*RegisterWorkflowHandlerReq) XXX_Size added in v0.2.0

func (m *RegisterWorkflowHandlerReq) XXX_Size() int

func (*RegisterWorkflowHandlerReq) XXX_Unmarshal added in v0.2.0

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

type RuntimeClient

type RuntimeClient interface {
	// Create new workflow using specified Input and API to call
	// If workflow is already created - error will be returned
	NewWorkflow(ctx context.Context, in *NewWorkflowReq, opts ...grpc.CallOption) (*Empty, error)
	// Update previously locked workflow with the new state
	// This operation may fail if some of selects were removed, while being unblocked.
	UpdateWorkflow(ctx context.Context, in *UpdateWorkflowReq, opts ...grpc.CallOption) (*Empty, error)
	// Listen for unblocked workflows, workflow events and then updated workflows.
	// Only 1 client can receive a workflow at a time
	// For each Workflow - all updates to it are executed one by one.
	// If multiple clients connect with the same "Service" name - events are randomly distributed between them,
	// however if one of the clients becomes slow - it may slowdown other clients with same "Service" name
	// Clients with different "Service" name do not affect each other. They have separate execution queues and
	// update distribution pool
	RegisterWorkflowHandler(ctx context.Context, in *RegisterWorkflowHandlerReq, opts ...grpc.CallOption) (Runtime_RegisterWorkflowHandlerClient, error)
	// Get current workflow
	GetWorkflow(ctx context.Context, in *GetWorkflowReq, opts ...grpc.CallOption) (*Workflow, error)
	// Manually lock workflow to change it's state via UpdateWorkflow
	LockWorkflow(ctx context.Context, in *LockWorkflowReq, opts ...grpc.CallOption) (*LockedWorkflow, error)
	// Listen for updates states. You can use this to sync data with other DB's, for ex. Search / Reports / etc.
	ListenWorkflowsUpdates(ctx context.Context, in *ListenWorkflowsUpdatesReq, opts ...grpc.CallOption) (Runtime_ListenWorkflowsUpdatesClient, error)
	FindWorkflows(ctx context.Context, in *FindWorkflowsReq, opts ...grpc.CallOption) (*FindWorkflowsResp, 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)
	DeleteChan(ctx context.Context, in *DeleteChanReq, 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)
	DeleteType(ctx context.Context, in *Type, opts ...grpc.CallOption) (*Empty, error)
	PutWorkflowAPI(ctx context.Context, in *WorkflowAPI, opts ...grpc.CallOption) (*Empty, error)
	ListWorkflowAPIs(ctx context.Context, in *ListWorkflowAPIsReq, opts ...grpc.CallOption) (*ListWorkflowAPIsResp, error)
	DeleteWorkflowAPI(ctx context.Context, in *WorkflowAPI, opts ...grpc.CallOption) (*Empty, 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 {
	// Create new workflow using specified Input and API to call
	// If workflow is already created - error will be returned
	NewWorkflow(context.Context, *NewWorkflowReq) (*Empty, error)
	// Update previously locked workflow with the new state
	// This operation may fail if some of selects were removed, while being unblocked.
	UpdateWorkflow(context.Context, *UpdateWorkflowReq) (*Empty, error)
	// Listen for unblocked workflows, workflow events and then updated workflows.
	// Only 1 client can receive a workflow at a time
	// For each Workflow - all updates to it are executed one by one.
	// If multiple clients connect with the same "Service" name - events are randomly distributed between them,
	// however if one of the clients becomes slow - it may slowdown other clients with same "Service" name
	// Clients with different "Service" name do not affect each other. They have separate execution queues and
	// update distribution pool
	RegisterWorkflowHandler(*RegisterWorkflowHandlerReq, Runtime_RegisterWorkflowHandlerServer) error
	// Get current workflow
	GetWorkflow(context.Context, *GetWorkflowReq) (*Workflow, error)
	// Manually lock workflow to change it's state via UpdateWorkflow
	LockWorkflow(context.Context, *LockWorkflowReq) (*LockedWorkflow, error)
	// Listen for updates states. You can use this to sync data with other DB's, for ex. Search / Reports / etc.
	ListenWorkflowsUpdates(*ListenWorkflowsUpdatesReq, Runtime_ListenWorkflowsUpdatesServer) error
	FindWorkflows(context.Context, *FindWorkflowsReq) (*FindWorkflowsResp, error)
	MakeChan(context.Context, *MakeChanReq) (*Empty, error)
	ListChans(context.Context, *ListChansReq) (*ListChansResp, error)
	CloseChan(context.Context, *CloseChanReq) (*Empty, error)
	DeleteChan(context.Context, *DeleteChanReq) (*Empty, error)
	PutType(context.Context, *Type) (*Empty, error)
	ListTypes(context.Context, *ListTypesReq) (*ListTypesResp, error)
	DeleteType(context.Context, *Type) (*Empty, error)
	PutWorkflowAPI(context.Context, *WorkflowAPI) (*Empty, error)
	ListWorkflowAPIs(context.Context, *ListWorkflowAPIsReq) (*ListWorkflowAPIsResp, error)
	DeleteWorkflowAPI(context.Context, *WorkflowAPI) (*Empty, error)
}

RuntimeServer is the server API for Runtime service.

type Runtime_ListenWorkflowsUpdatesClient added in v0.2.0

type Runtime_ListenWorkflowsUpdatesClient interface {
	Recv() (*WorkflowEvent, error)
	grpc.ClientStream
}

type Runtime_ListenWorkflowsUpdatesServer added in v0.2.0

type Runtime_ListenWorkflowsUpdatesServer interface {
	Send(*WorkflowEvent) error
	grpc.ServerStream
}

type Runtime_RegisterWorkflowHandlerClient added in v0.2.0

type Runtime_RegisterWorkflowHandlerClient interface {
	Recv() (*LockedWorkflow, error)
	grpc.ClientStream
}

type Runtime_RegisterWorkflowHandlerServer added in v0.2.0

type Runtime_RegisterWorkflowHandlerServer interface {
	Send(*LockedWorkflow) 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=core.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
	Workflows []WorkflowDefinition
}

type Thread

type Thread struct {
	Id          string        `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Workflow    string        `protobuf:"bytes,2,opt,name=workflow,proto3" json:"workflow,omitempty"`
	Service     string        `protobuf:"bytes,4,opt,name=service,proto3" json:"service,omitempty"`
	Status      Thread_Status `protobuf:"varint,6,opt,name=status,proto3,enum=core.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) 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) GetWorkflow added in v0.2.0

func (m *Thread) GetWorkflow() string

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{}, version uint64, description string) *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 UpdateWorkflowReq added in v0.2.0

type UpdateWorkflowReq struct {
	Workflow             *Workflow `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,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 workflow

func (*UpdateWorkflowReq) Descriptor added in v0.2.0

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

func (*UpdateWorkflowReq) GetLockId added in v0.2.0

func (m *UpdateWorkflowReq) GetLockId() uint64

func (*UpdateWorkflowReq) GetUnblockedAt added in v0.2.0

func (m *UpdateWorkflowReq) GetUnblockedAt() uint64

func (*UpdateWorkflowReq) GetWorkflow added in v0.2.0

func (m *UpdateWorkflowReq) GetWorkflow() *Workflow

func (*UpdateWorkflowReq) ProtoMessage added in v0.2.0

func (*UpdateWorkflowReq) ProtoMessage()

func (*UpdateWorkflowReq) Reset added in v0.2.0

func (m *UpdateWorkflowReq) Reset()

func (*UpdateWorkflowReq) String added in v0.2.0

func (m *UpdateWorkflowReq) String() string

func (*UpdateWorkflowReq) XXX_DiscardUnknown added in v0.2.0

func (m *UpdateWorkflowReq) XXX_DiscardUnknown()

func (*UpdateWorkflowReq) XXX_Marshal added in v0.2.0

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

func (*UpdateWorkflowReq) XXX_Merge added in v0.2.0

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

func (*UpdateWorkflowReq) XXX_Size added in v0.2.0

func (m *UpdateWorkflowReq) XXX_Size() int

func (*UpdateWorkflowReq) XXX_Unmarshal added in v0.2.0

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

type W added in v0.3.0

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

func (*W) After added in v0.3.0

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

func (*W) At added in v0.3.0

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

func (*W) Call added in v0.3.0

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

func (*W) Default added in v0.3.0

func (p *W) Default() *W

func (*W) Finish added in v0.3.0

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

func (*W) Go added in v0.3.0

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

func (*W) ID added in v0.3.0

func (p *W) ID() string

func (*W) MakeChan added in v0.3.0

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

func (*W) Name added in v0.3.0

func (p *W) Name() string

Name is a workflow name (not ID).

func (*W) NewID added in v0.3.0

func (p *W) NewID() string

func (*W) Recv added in v0.3.0

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

func (*W) Select added in v0.3.0

func (p *W) Select() *W

for readability

func (*W) Send added in v0.3.0

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

func (*W) Service added in v0.3.0

func (p *W) Service() string

Name is a workflow name (not ID).

func (*W) To added in v0.3.0

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

type WaitCallIndex

type WaitCallIndex struct {
	BlockedAt            uint64   `protobuf:"varint,1,opt,name=blockedAt,proto3" json:"blockedAt,omitempty"`
	WorkflowsId          string   `protobuf:"bytes,2,opt,name=workflowsId,proto3" json:"workflowsId,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) GetWorkflowsId added in v0.2.0

func (m *WaitCallIndex) GetWorkflowsId() 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

type Workflow added in v0.2.0

type Workflow 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               Workflow_Status `protobuf:"varint,4,opt,name=status,proto3,enum=core.Workflow_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 (*Workflow) Descriptor added in v0.2.0

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

func (*Workflow) GetId added in v0.2.0

func (m *Workflow) GetId() string

func (*Workflow) GetInput added in v0.2.0

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

func (*Workflow) GetName added in v0.2.0

func (m *Workflow) GetName() string

func (*Workflow) GetOutput added in v0.2.0

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

func (*Workflow) GetService added in v0.2.0

func (m *Workflow) GetService() string

func (*Workflow) GetState added in v0.2.0

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

func (*Workflow) GetStatus added in v0.2.0

func (m *Workflow) GetStatus() Workflow_Status

func (*Workflow) GetThreads added in v0.2.0

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

func (*Workflow) GetUpdatedAt added in v0.2.0

func (m *Workflow) GetUpdatedAt() uint64

func (*Workflow) GetVersion added in v0.2.0

func (m *Workflow) GetVersion() uint64

func (*Workflow) HasThread added in v0.2.0

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

func (*Workflow) ProtoMessage added in v0.2.0

func (*Workflow) ProtoMessage()

func (*Workflow) Reset added in v0.2.0

func (m *Workflow) Reset()

func (*Workflow) SetThread added in v0.2.0

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

func (*Workflow) String added in v0.2.0

func (m *Workflow) String() string

func (*Workflow) XXX_DiscardUnknown added in v0.2.0

func (m *Workflow) XXX_DiscardUnknown()

func (*Workflow) XXX_Marshal added in v0.2.0

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

func (*Workflow) XXX_Merge added in v0.2.0

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

func (*Workflow) XXX_Size added in v0.2.0

func (m *Workflow) XXX_Size() int

func (*Workflow) XXX_Unmarshal added in v0.2.0

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

type WorkflowAPI added in v0.2.0

type WorkflowAPI 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 (*WorkflowAPI) Descriptor added in v0.2.0

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

func (*WorkflowAPI) GetDescription added in v0.2.0

func (m *WorkflowAPI) GetDescription() string

func (*WorkflowAPI) GetInput added in v0.2.0

func (m *WorkflowAPI) GetInput() string

func (*WorkflowAPI) GetName added in v0.2.0

func (m *WorkflowAPI) GetName() string

func (*WorkflowAPI) GetOutput added in v0.2.0

func (m *WorkflowAPI) GetOutput() string

func (*WorkflowAPI) GetService added in v0.2.0

func (m *WorkflowAPI) GetService() string

func (*WorkflowAPI) GetState added in v0.2.0

func (m *WorkflowAPI) GetState() string

func (*WorkflowAPI) ProtoMessage added in v0.2.0

func (*WorkflowAPI) ProtoMessage()

func (*WorkflowAPI) Reset added in v0.2.0

func (m *WorkflowAPI) Reset()

func (*WorkflowAPI) String added in v0.2.0

func (m *WorkflowAPI) String() string

func (*WorkflowAPI) XXX_DiscardUnknown added in v0.2.0

func (m *WorkflowAPI) XXX_DiscardUnknown()

func (*WorkflowAPI) XXX_Marshal added in v0.2.0

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

func (*WorkflowAPI) XXX_Merge added in v0.2.0

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

func (*WorkflowAPI) XXX_Size added in v0.2.0

func (m *WorkflowAPI) XXX_Size() int

func (*WorkflowAPI) XXX_Unmarshal added in v0.2.0

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

type WorkflowDefinition added in v0.3.3

type WorkflowDefinition struct {
	API      *WorkflowAPI
	Setup    func() (interface{}, error)
	Teardown func(interface{}) error
}

type WorkflowEvent added in v0.2.0

type WorkflowEvent struct {
	Workflow             *Workflow `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,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 (*WorkflowEvent) Descriptor added in v0.2.0

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

func (*WorkflowEvent) GetThread added in v0.2.0

func (m *WorkflowEvent) GetThread() *Thread

func (*WorkflowEvent) GetWorkflow added in v0.2.0

func (m *WorkflowEvent) GetWorkflow() *Workflow

func (*WorkflowEvent) ProtoMessage added in v0.2.0

func (*WorkflowEvent) ProtoMessage()

func (*WorkflowEvent) Reset added in v0.2.0

func (m *WorkflowEvent) Reset()

func (*WorkflowEvent) String added in v0.2.0

func (m *WorkflowEvent) String() string

func (*WorkflowEvent) XXX_DiscardUnknown added in v0.2.0

func (m *WorkflowEvent) XXX_DiscardUnknown()

func (*WorkflowEvent) XXX_Marshal added in v0.2.0

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

func (*WorkflowEvent) XXX_Merge added in v0.2.0

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

func (*WorkflowEvent) XXX_Size added in v0.2.0

func (m *WorkflowEvent) XXX_Size() int

func (*WorkflowEvent) XXX_Unmarshal added in v0.2.0

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

type Workflow_Status added in v0.2.0

type Workflow_Status int32
const (
	Workflow_Invalid  Workflow_Status = 0
	Workflow_Started  Workflow_Status = 1
	Workflow_Running  Workflow_Status = 2
	Workflow_Finished Workflow_Status = 3
)

func (Workflow_Status) EnumDescriptor added in v0.2.0

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

func (Workflow_Status) String added in v0.2.0

func (x Workflow_Status) String() string

Jump to

Keyboard shortcuts

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