Documentation ¶
Index ¶
- Variables
- func RunProcess(s *State, p Process) error
- type Callback
- func (*Callback) Descriptor() ([]byte, []int)
- func (m *Callback) GetType() Callback_CallbackType
- func (m *Callback) GetUri() string
- func (*Callback) ProtoMessage()
- func (m *Callback) Reset()
- func (m *Callback) String() string
- func (m *Callback) XXX_DiscardUnknown()
- func (m *Callback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Callback) XXX_Merge(src proto.Message)
- func (m *Callback) XXX_Size() int
- func (m *Callback) XXX_Unmarshal(b []byte) error
- type Callback_CallbackType
- type Case
- func (*Case) Descriptor() ([]byte, []int)
- func (m *Case) GetChan() string
- func (m *Case) GetData() []byte
- func (m *Case) GetIndex() int64
- func (m *Case) GetOp() Case_CaseOp
- func (m *Case) GetTime() int64
- func (*Case) ProtoMessage()
- func (m *Case) Reset()
- func (m *Case) String() string
- func (m *Case) XXX_DiscardUnknown()
- func (m *Case) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Case) XXX_Merge(src proto.Message)
- func (m *Case) XXX_Size() int
- func (m *Case) XXX_Unmarshal(b []byte) error
- type Case_CaseOp
- type Channel
- type Engine
- type ForLoop
- type Func
- type Process
- type Result
- func (*Result) Descriptor() ([]byte, []int)
- func (m *Result) GetCaseIndex() int64
- func (m *Result) GetData() []byte
- func (m *Result) GetSelectID() string
- func (m *Result) GetSelectSeq() int64
- func (m *Result) GetStateID() string
- func (m *Result) GetTime() int64
- func (m *Result) GetType() Result_ResultType
- func (*Result) ProtoMessage()
- func (m *Result) Reset()
- func (m *Result) String() string
- func (m *Result) XXX_DiscardUnknown()
- func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Result) XXX_Merge(src proto.Message)
- func (m *Result) XXX_Size() int
- func (m *Result) XXX_Unmarshal(b []byte) error
- type Result_ResultType
- type SelCase
- type Select
- func (*Select) Descriptor() ([]byte, []int)
- func (m *Select) GetCases() []*Case
- func (m *Select) GetResult() *Result
- func (m *Select) GetSelID() string
- func (m *Select) GetSeq() int64
- func (m *Select) GetStateID() string
- func (*Select) ProtoMessage()
- func (m *Select) Reset()
- func (m *Select) String() string
- func (m *Select) XXX_DiscardUnknown()
- func (m *Select) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Select) XXX_Merge(src proto.Message)
- func (m *Select) XXX_Size() int
- func (m *Select) XXX_Unmarshal(b []byte) error
- type State
- func (*State) Descriptor() ([]byte, []int)
- func (m *State) GetCallback() *Callback
- func (m *State) GetData() []byte
- func (m *State) GetID() string
- func (m *State) GetLock() string
- func (m *State) GetLockTill() int64
- func (m *State) GetRaftSeq() uint64
- func (m *State) GetSelects() []*Select
- func (m *State) GetStatus() Status
- func (*State) ProtoMessage()
- func (m *State) Reset()
- func (m *State) String() string
- func (m *State) XXX_DiscardUnknown()
- func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *State) XXX_Merge(src proto.Message)
- func (m *State) XXX_Size() int
- func (m *State) XXX_Unmarshal(b []byte) error
- type Status
- type Stmt
- type SwCase
- type TimeChannel
Constants ¶
This section is empty.
Variables ¶
View Source
var Callback_CallbackType_name = map[int32]string{
0: "Invalid",
1: "HTTP",
}
View Source
var Callback_CallbackType_value = map[string]int32{
"Invalid": 0,
"HTTP": 1,
}
View Source
var Case_CaseOp_name = map[int32]string{
0: "Invalid",
1: "Recv",
2: "Send",
3: "Time",
4: "Close",
5: "Default",
}
View Source
var Case_CaseOp_value = map[string]int32{
"Invalid": 0,
"Recv": 1,
"Send": 2,
"Time": 3,
"Close": 4,
"Default": 5,
}
View Source
var Result_ResultType_name = map[int32]string{
0: "Invalid",
1: "OK",
2: "Closed",
}
View Source
var Result_ResultType_value = map[string]int32{
"Invalid": 0,
"OK": 1,
"Closed": 2,
}
View Source
var Status_name = map[int32]string{
0: "Invalid",
1: "Waiting",
2: "Callback_Pending",
3: "Callback_Failed",
4: "Callback_Skipped",
}
View Source
var Status_value = map[string]int32{
"Invalid": 0,
"Waiting": 1,
"Callback_Pending": 2,
"Callback_Failed": 3,
"Callback_Skipped": 4,
}
Functions ¶
func RunProcess ¶ added in v0.1.2
Types ¶
type Callback ¶
type Callback struct { Type Callback_CallbackType `protobuf:"varint,1,opt,name=type,proto3,enum=async.Callback_CallbackType" json:"type,omitempty"` Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Callback) Descriptor ¶
func (*Callback) GetType ¶
func (m *Callback) GetType() Callback_CallbackType
func (*Callback) ProtoMessage ¶
func (*Callback) ProtoMessage()
func (*Callback) XXX_DiscardUnknown ¶
func (m *Callback) XXX_DiscardUnknown()
func (*Callback) XXX_Marshal ¶
func (*Callback) XXX_Unmarshal ¶
type Callback_CallbackType ¶
type Callback_CallbackType int32
const ( Callback_Invalid Callback_CallbackType = 0 Callback_HTTP Callback_CallbackType = 1 )
func (Callback_CallbackType) EnumDescriptor ¶
func (Callback_CallbackType) EnumDescriptor() ([]byte, []int)
func (Callback_CallbackType) String ¶
func (x Callback_CallbackType) String() string
type Case ¶
type Case struct { Op Case_CaseOp `protobuf:"varint,1,opt,name=op,proto3,enum=async.Case_CaseOp" json:"op,omitempty"` Index int64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` Chan string `protobuf:"bytes,3,opt,name=chan,proto3" json:"chan,omitempty"` Time int64 `protobuf:"varint,4,opt,name=time,proto3" json:"time,omitempty"` Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Case) Descriptor ¶
func (*Case) GetOp ¶
func (m *Case) GetOp() Case_CaseOp
func (*Case) ProtoMessage ¶
func (*Case) ProtoMessage()
func (*Case) XXX_DiscardUnknown ¶
func (m *Case) XXX_DiscardUnknown()
func (*Case) XXX_Unmarshal ¶
type Case_CaseOp ¶
type Case_CaseOp int32
const ( Case_Invalid Case_CaseOp = 0 Case_Recv Case_CaseOp = 1 Case_Send Case_CaseOp = 2 Case_Time Case_CaseOp = 3 Case_Close Case_CaseOp = 4 Case_Default Case_CaseOp = 5 )
func (Case_CaseOp) EnumDescriptor ¶
func (Case_CaseOp) EnumDescriptor() ([]byte, []int)
func (Case_CaseOp) String ¶
func (x Case_CaseOp) String() string
type Engine ¶
type Result ¶
type Result struct { Type Result_ResultType `protobuf:"varint,1,opt,name=type,proto3,enum=async.Result_ResultType" json:"type,omitempty"` SelectID string `protobuf:"bytes,2,opt,name=selectID,proto3" json:"selectID,omitempty"` StateID string `protobuf:"bytes,3,opt,name=stateID,proto3" json:"stateID,omitempty"` CaseIndex int64 `protobuf:"varint,4,opt,name=caseIndex,proto3" json:"caseIndex,omitempty"` Time int64 `protobuf:"varint,5,opt,name=time,proto3" json:"time,omitempty"` SelectSeq int64 `protobuf:"varint,6,opt,name=selectSeq,proto3" json:"selectSeq,omitempty"` Data []byte `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Result) Descriptor ¶
func (*Result) GetCaseIndex ¶
func (*Result) GetSelectID ¶
func (*Result) GetSelectSeq ¶
func (*Result) GetStateID ¶
func (*Result) GetType ¶
func (m *Result) GetType() Result_ResultType
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
func (*Result) XXX_DiscardUnknown ¶
func (m *Result) XXX_DiscardUnknown()
func (*Result) XXX_Marshal ¶
func (*Result) XXX_Unmarshal ¶
type Result_ResultType ¶
type Result_ResultType int32
const ( Result_Invalid Result_ResultType = 0 Result_OK Result_ResultType = 1 Result_Closed Result_ResultType = 2 )
func (Result_ResultType) EnumDescriptor ¶
func (Result_ResultType) EnumDescriptor() ([]byte, []int)
func (Result_ResultType) String ¶
func (x Result_ResultType) String() string
type SelCase ¶
type SelCase struct { Op Case_CaseOp Send func() interface{} Dst func() []interface{} Chan func() Channel Stmts []Stmt }
type Select ¶
type Select struct { SelID string `protobuf:"bytes,1,opt,name=selID,proto3" json:"selID,omitempty"` StateID string `protobuf:"bytes,2,opt,name=stateID,proto3" json:"stateID,omitempty"` Result *Result `protobuf:"bytes,5,opt,name=result,proto3" json:"result,omitempty"` Cases []*Case `protobuf:"bytes,3,rep,name=cases,proto3" json:"cases,omitempty"` Seq int64 `protobuf:"varint,4,opt,name=seq,proto3" json:"seq,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Select) Descriptor ¶
func (*Select) GetStateID ¶
func (*Select) ProtoMessage ¶
func (*Select) ProtoMessage()
func (*Select) XXX_DiscardUnknown ¶
func (m *Select) XXX_DiscardUnknown()
func (*Select) XXX_Marshal ¶
func (*Select) XXX_Unmarshal ¶
type State ¶
type State struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=async.Status" json:"status,omitempty"` Selects []*Select `protobuf:"bytes,3,rep,name=selects,proto3" json:"selects,omitempty"` Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` Callback *Callback `protobuf:"bytes,6,opt,name=callback,proto3" json:"callback,omitempty"` RaftSeq uint64 `protobuf:"varint,7,opt,name=raftSeq,proto3" json:"raftSeq,omitempty"` Lock string `protobuf:"bytes,8,opt,name=lock,proto3" json:"lock,omitempty"` LockTill int64 `protobuf:"varint,9,opt,name=lockTill,proto3" json:"lockTill,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*State) Descriptor ¶
func (*State) GetCallback ¶
func (*State) GetLockTill ¶
func (*State) GetRaftSeq ¶
func (*State) GetSelects ¶
func (*State) ProtoMessage ¶
func (*State) ProtoMessage()
func (*State) XXX_DiscardUnknown ¶
func (m *State) XXX_DiscardUnknown()
func (*State) XXX_Marshal ¶
func (*State) XXX_Unmarshal ¶
type TimeChannel ¶ added in v0.1.1
type TimeChannel struct { Time int64 C chan struct{} }
func After ¶
func After(t time.Duration) TimeChannel
func (TimeChannel) ChannelName ¶ added in v0.1.1
func (t TimeChannel) ChannelName() string
Click to show internal directories.
Click to hide internal directories.