Documentation ¶
Index ¶
- Variables
- func RegisterSynerexServer(s *grpc.Server, srv SynerexServer)
- type Channel
- func (*Channel) Descriptor() ([]byte, []int)deprecated
- func (x *Channel) GetArgJson() string
- func (x *Channel) GetChannelType() uint32
- func (x *Channel) GetClientId() uint64
- func (*Channel) ProtoMessage()
- func (x *Channel) ProtoReflect() protoreflect.Message
- func (x *Channel) Reset()
- func (x *Channel) String() string
- type ConfirmResponse
- func (*ConfirmResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ConfirmResponse) GetErr() string
- func (x *ConfirmResponse) GetMbusId() uint64
- func (x *ConfirmResponse) GetOk() bool
- func (x *ConfirmResponse) GetWait() *durationpb.Duration
- func (*ConfirmResponse) ProtoMessage()
- func (x *ConfirmResponse) ProtoReflect() protoreflect.Message
- func (x *ConfirmResponse) Reset()
- func (x *ConfirmResponse) String() string
- type Content
- type Demand
- func (*Demand) Descriptor() ([]byte, []int)deprecated
- func (x *Demand) GetArgJson() string
- func (x *Demand) GetCdata() *Content
- func (x *Demand) GetChannelType() uint32
- func (x *Demand) GetDemandName() string
- func (x *Demand) GetId() uint64
- func (x *Demand) GetMbusId() uint64
- func (x *Demand) GetSenderId() uint64
- func (x *Demand) GetTargetId() uint64
- func (x *Demand) GetTs() *timestamppb.Timestamp
- func (*Demand) ProtoMessage()
- func (x *Demand) ProtoReflect() protoreflect.Message
- func (x *Demand) Reset()
- func (x *Demand) String() string
- type GatewayInfo
- func (*GatewayInfo) Descriptor() ([]byte, []int)deprecated
- func (x *GatewayInfo) GetChannels() []uint32
- func (x *GatewayInfo) GetClientId() uint64
- func (x *GatewayInfo) GetGatewayType() GatewayType
- func (*GatewayInfo) ProtoMessage()
- func (x *GatewayInfo) ProtoReflect() protoreflect.Message
- func (x *GatewayInfo) Reset()
- func (x *GatewayInfo) String() string
- type GatewayMsg
- func (*GatewayMsg) Descriptor() ([]byte, []int)deprecated
- func (x *GatewayMsg) GetDemand() *Demand
- func (x *GatewayMsg) GetMbus() *Mbus
- func (x *GatewayMsg) GetMbusMsg() *MbusMsg
- func (m *GatewayMsg) GetMsgOneof() isGatewayMsg_MsgOneof
- func (x *GatewayMsg) GetMsgType() MsgType
- func (x *GatewayMsg) GetSrcSynerexId() uint64
- func (x *GatewayMsg) GetSupply() *Supply
- func (x *GatewayMsg) GetTarget() *Target
- func (*GatewayMsg) ProtoMessage()
- func (x *GatewayMsg) ProtoReflect() protoreflect.Message
- func (x *GatewayMsg) Reset()
- func (x *GatewayMsg) String() string
- type GatewayMsg_Demand
- type GatewayMsg_Mbus
- type GatewayMsg_MbusMsg
- type GatewayMsg_Supply
- type GatewayMsg_Target
- type GatewayType
- func (GatewayType) Descriptor() protoreflect.EnumDescriptor
- func (x GatewayType) Enum() *GatewayType
- func (GatewayType) EnumDescriptor() ([]byte, []int)deprecated
- func (x GatewayType) Number() protoreflect.EnumNumber
- func (x GatewayType) String() string
- func (GatewayType) Type() protoreflect.EnumType
- type Mbus
- type MbusMsg
- func (*MbusMsg) Descriptor() ([]byte, []int)deprecated
- func (x *MbusMsg) GetArgJson() string
- func (x *MbusMsg) GetCdata() *Content
- func (x *MbusMsg) GetMbusId() uint64
- func (x *MbusMsg) GetMsgId() uint64
- func (x *MbusMsg) GetMsgInfo() string
- func (x *MbusMsg) GetMsgType() uint32
- func (x *MbusMsg) GetSenderId() uint64
- func (x *MbusMsg) GetTargetId() uint64
- func (*MbusMsg) ProtoMessage()
- func (x *MbusMsg) ProtoReflect() protoreflect.Message
- func (x *MbusMsg) Reset()
- func (x *MbusMsg) String() string
- type MbusOpt
- type MbusOpt_MbusType
- func (MbusOpt_MbusType) Descriptor() protoreflect.EnumDescriptor
- func (x MbusOpt_MbusType) Enum() *MbusOpt_MbusType
- func (MbusOpt_MbusType) EnumDescriptor() ([]byte, []int)deprecated
- func (x MbusOpt_MbusType) Number() protoreflect.EnumNumber
- func (x MbusOpt_MbusType) String() string
- func (MbusOpt_MbusType) Type() protoreflect.EnumType
- type MbusState
- func (*MbusState) Descriptor() ([]byte, []int)deprecated
- func (x *MbusState) GetMbusId() uint64
- func (x *MbusState) GetStatus() MbusState_MbusStatus
- func (x *MbusState) GetSubscribers() []uint64
- func (*MbusState) ProtoMessage()
- func (x *MbusState) ProtoReflect() protoreflect.Message
- func (x *MbusState) Reset()
- func (x *MbusState) String() string
- type MbusState_MbusStatus
- func (MbusState_MbusStatus) Descriptor() protoreflect.EnumDescriptor
- func (x MbusState_MbusStatus) Enum() *MbusState_MbusStatus
- func (MbusState_MbusStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x MbusState_MbusStatus) Number() protoreflect.EnumNumber
- func (x MbusState_MbusStatus) String() string
- func (MbusState_MbusStatus) Type() protoreflect.EnumType
- type MsgType
- type ProviderID
- type Response
- type Supply
- func (*Supply) Descriptor() ([]byte, []int)deprecated
- func (x *Supply) GetArgJson() string
- func (x *Supply) GetCdata() *Content
- func (x *Supply) GetChannelType() uint32
- func (x *Supply) GetId() uint64
- func (x *Supply) GetMbusId() uint64
- func (x *Supply) GetSenderId() uint64
- func (x *Supply) GetSupplyName() string
- func (x *Supply) GetTargetId() uint64
- func (x *Supply) GetTs() *timestamppb.Timestamp
- func (*Supply) ProtoMessage()
- func (x *Supply) ProtoReflect() protoreflect.Message
- func (x *Supply) Reset()
- func (x *Supply) String() string
- type SynerexClient
- type SynerexServer
- type Synerex_SubscribeDemandClient
- type Synerex_SubscribeDemandServer
- type Synerex_SubscribeGatewayClient
- type Synerex_SubscribeGatewayServer
- type Synerex_SubscribeMbusClient
- type Synerex_SubscribeMbusServer
- type Synerex_SubscribeSupplyClient
- type Synerex_SubscribeSupplyServer
- type Target
- func (*Target) Descriptor() ([]byte, []int)deprecated
- func (x *Target) GetChannelType() uint32
- func (x *Target) GetId() uint64
- func (x *Target) GetMbusId() uint64
- func (x *Target) GetSenderId() uint64
- func (x *Target) GetTargetId() uint64
- func (x *Target) GetWait() *durationpb.Duration
- func (*Target) ProtoMessage()
- func (x *Target) ProtoReflect() protoreflect.Message
- func (x *Target) Reset()
- func (x *Target) String() string
- type UnimplementedSynerexServer
- func (*UnimplementedSynerexServer) CloseAllChannels(context.Context, *ProviderID) (*Response, error)
- func (*UnimplementedSynerexServer) CloseDemandChannel(context.Context, *Channel) (*Response, error)
- func (*UnimplementedSynerexServer) CloseMbus(context.Context, *Mbus) (*Response, error)
- func (*UnimplementedSynerexServer) CloseSupplyChannel(context.Context, *Channel) (*Response, error)
- func (*UnimplementedSynerexServer) Confirm(context.Context, *Target) (*Response, error)
- func (*UnimplementedSynerexServer) CreateMbus(context.Context, *MbusOpt) (*Mbus, error)
- func (*UnimplementedSynerexServer) ForwardToGateway(context.Context, *GatewayMsg) (*Response, error)
- func (*UnimplementedSynerexServer) GetMbusState(context.Context, *Mbus) (*MbusState, error)
- func (*UnimplementedSynerexServer) NotifyDemand(context.Context, *Demand) (*Response, error)
- func (*UnimplementedSynerexServer) NotifySupply(context.Context, *Supply) (*Response, error)
- func (*UnimplementedSynerexServer) ProposeDemand(context.Context, *Demand) (*Response, error)
- func (*UnimplementedSynerexServer) ProposeSupply(context.Context, *Supply) (*Response, error)
- func (*UnimplementedSynerexServer) SelectDemand(context.Context, *Target) (*ConfirmResponse, error)
- func (*UnimplementedSynerexServer) SelectModifiedSupply(context.Context, *Supply) (*ConfirmResponse, error)
- func (*UnimplementedSynerexServer) SelectSupply(context.Context, *Target) (*ConfirmResponse, error)
- func (*UnimplementedSynerexServer) SendMbusMsg(context.Context, *MbusMsg) (*Response, error)
- func (*UnimplementedSynerexServer) SubscribeDemand(*Channel, Synerex_SubscribeDemandServer) error
- func (*UnimplementedSynerexServer) SubscribeGateway(*GatewayInfo, Synerex_SubscribeGatewayServer) error
- func (*UnimplementedSynerexServer) SubscribeMbus(*Mbus, Synerex_SubscribeMbusServer) error
- func (*UnimplementedSynerexServer) SubscribeSupply(*Channel, Synerex_SubscribeSupplyServer) error
Constants ¶
This section is empty.
Variables ¶
var ( GatewayType_name = map[int32]string{ 0: "BIDIRECTIONAL", 1: "WRITE_ONLY", 2: "READ_ONLY", } GatewayType_value = map[string]int32{ "BIDIRECTIONAL": 0, "WRITE_ONLY": 1, "READ_ONLY": 2, } )
Enum value maps for GatewayType.
var ( MsgType_name = map[int32]string{ 0: "DEMAND", 1: "SUPPLY", 2: "TARGET", 3: "MBUS", 4: "MBUSMSG", } MsgType_value = map[string]int32{ "DEMAND": 0, "SUPPLY": 1, "TARGET": 2, "MBUS": 3, "MBUSMSG": 4, } )
Enum value maps for MsgType.
var ( MbusOpt_MbusType_name = map[int32]string{ 0: "PUBLIC", 1: "PRIVATE", } MbusOpt_MbusType_value = map[string]int32{ "PUBLIC": 0, "PRIVATE": 1, } )
Enum value maps for MbusOpt_MbusType.
var ( MbusState_MbusStatus_name = map[int32]string{ 0: "INTIALIZED", 1: "SUBSCRIBERS", 2: "CLOSED", 3: "INVALID", } MbusState_MbusStatus_value = map[string]int32{ "INTIALIZED": 0, "SUBSCRIBERS": 1, "CLOSED": 2, "INVALID": 3, } )
Enum value maps for MbusState_MbusStatus.
var File_synerex_proto protoreflect.FileDescriptor
Functions ¶
func RegisterSynerexServer ¶
func RegisterSynerexServer(s *grpc.Server, srv SynerexServer)
Types ¶
type Channel ¶
type Channel struct { ClientId uint64 `protobuf:"fixed64,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` ChannelType uint32 `protobuf:"varint,2,opt,name=channel_type,json=channelType,proto3" json:"channel_type,omitempty"` // channel type ArgJson string `protobuf:"bytes,3,opt,name=arg_json,json=argJson,proto3" json:"arg_json,omitempty"` // for Channel Argument // contains filtered or unexported fields }
func (*Channel) Descriptor
deprecated
func (*Channel) GetArgJson ¶
func (*Channel) GetChannelType ¶
func (*Channel) GetClientId ¶
func (*Channel) ProtoMessage ¶
func (*Channel) ProtoMessage()
func (*Channel) ProtoReflect ¶ added in v0.4.0
func (x *Channel) ProtoReflect() protoreflect.Message
type ConfirmResponse ¶
type ConfirmResponse struct { Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` MbusId uint64 `protobuf:"fixed64,2,opt,name=mbus_id,json=mbusId,proto3" json:"mbus_id,omitempty"` Wait *durationpb.Duration `protobuf:"bytes,3,opt,name=wait,proto3" json:"wait,omitempty"` Err string `protobuf:"bytes,4,opt,name=err,proto3" json:"err,omitempty"` // contains filtered or unexported fields }
func (*ConfirmResponse) Descriptor
deprecated
func (*ConfirmResponse) Descriptor() ([]byte, []int)
Deprecated: Use ConfirmResponse.ProtoReflect.Descriptor instead.
func (*ConfirmResponse) GetErr ¶
func (x *ConfirmResponse) GetErr() string
func (*ConfirmResponse) GetMbusId ¶
func (x *ConfirmResponse) GetMbusId() uint64
func (*ConfirmResponse) GetOk ¶
func (x *ConfirmResponse) GetOk() bool
func (*ConfirmResponse) GetWait ¶
func (x *ConfirmResponse) GetWait() *durationpb.Duration
func (*ConfirmResponse) ProtoMessage ¶
func (*ConfirmResponse) ProtoMessage()
func (*ConfirmResponse) ProtoReflect ¶ added in v0.4.0
func (x *ConfirmResponse) ProtoReflect() protoreflect.Message
func (*ConfirmResponse) Reset ¶
func (x *ConfirmResponse) Reset()
func (*ConfirmResponse) String ¶
func (x *ConfirmResponse) String() string
type Content ¶
type Content struct { Entity []byte `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` // contains filtered or unexported fields }
func (*Content) Descriptor
deprecated
func (*Content) ProtoMessage ¶
func (*Content) ProtoMessage()
func (*Content) ProtoReflect ¶ added in v0.4.0
func (x *Content) ProtoReflect() protoreflect.Message
type Demand ¶
type Demand struct { Id uint64 `protobuf:"fixed64,1,opt,name=id,proto3" json:"id,omitempty"` SenderId uint64 `protobuf:"fixed64,2,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"` TargetId uint64 `protobuf:"fixed64,3,opt,name=target_id,json=targetId,proto3" json:"target_id,omitempty"` // if set with message id (not for sender_id) (select for supply) ChannelType uint32 `protobuf:"varint,4,opt,name=channel_type,json=channelType,proto3" json:"channel_type,omitempty"` // channel type DemandName string `protobuf:"bytes,5,opt,name=demand_name,json=demandName,proto3" json:"demand_name,omitempty"` Ts *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=ts,proto3" json:"ts,omitempty"` ArgJson string `protobuf:"bytes,7,opt,name=arg_json,json=argJson,proto3" json:"arg_json,omitempty"` MbusId uint64 `protobuf:"fixed64,8,opt,name=mbus_id,json=mbusId,proto3" json:"mbus_id,omitempty"` // new mbus id for select supply... Cdata *Content `protobuf:"bytes,9,opt,name=cdata,proto3" json:"cdata,omitempty"` // content data // contains filtered or unexported fields }
func (*Demand) Descriptor
deprecated
func (*Demand) GetArgJson ¶
func (*Demand) GetChannelType ¶
func (*Demand) GetDemandName ¶
func (*Demand) GetSenderId ¶
func (*Demand) GetTargetId ¶
func (*Demand) GetTs ¶
func (x *Demand) GetTs() *timestamppb.Timestamp
func (*Demand) ProtoMessage ¶
func (*Demand) ProtoMessage()
func (*Demand) ProtoReflect ¶ added in v0.4.0
func (x *Demand) ProtoReflect() protoreflect.Message
type GatewayInfo ¶ added in v0.1.1
type GatewayInfo struct { ClientId uint64 `protobuf:"fixed64,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` // client_id (snowflake) of gateway GatewayType GatewayType `protobuf:"varint,2,opt,name=gateway_type,json=gatewayType,proto3,enum=api.GatewayType" json:"gateway_type,omitempty"` Channels []uint32 `protobuf:"varint,3,rep,packed,name=channels,proto3" json:"channels,omitempty"` // which channel for forward // contains filtered or unexported fields }
func (*GatewayInfo) Descriptor
deprecated
added in
v0.1.1
func (*GatewayInfo) Descriptor() ([]byte, []int)
Deprecated: Use GatewayInfo.ProtoReflect.Descriptor instead.
func (*GatewayInfo) GetChannels ¶ added in v0.2.1
func (x *GatewayInfo) GetChannels() []uint32
func (*GatewayInfo) GetClientId ¶ added in v0.2.1
func (x *GatewayInfo) GetClientId() uint64
func (*GatewayInfo) GetGatewayType ¶ added in v0.1.1
func (x *GatewayInfo) GetGatewayType() GatewayType
func (*GatewayInfo) ProtoMessage ¶ added in v0.1.1
func (*GatewayInfo) ProtoMessage()
func (*GatewayInfo) ProtoReflect ¶ added in v0.4.0
func (x *GatewayInfo) ProtoReflect() protoreflect.Message
func (*GatewayInfo) Reset ¶ added in v0.1.1
func (x *GatewayInfo) Reset()
func (*GatewayInfo) String ¶ added in v0.1.1
func (x *GatewayInfo) String() string
type GatewayMsg ¶ added in v0.1.1
type GatewayMsg struct { SrcSynerexId uint64 `protobuf:"fixed64,1,opt,name=src_synerex_id,json=srcSynerexId,proto3" json:"src_synerex_id,omitempty"` MsgType MsgType `protobuf:"varint,2,opt,name=msg_type,json=msgType,proto3,enum=api.MsgType" json:"msg_type,omitempty"` // massage type // Types that are assignable to MsgOneof: // *GatewayMsg_Demand // *GatewayMsg_Supply // *GatewayMsg_Target // *GatewayMsg_Mbus // *GatewayMsg_MbusMsg MsgOneof isGatewayMsg_MsgOneof `protobuf_oneof:"msg_oneof"` // contains filtered or unexported fields }
Subscribe from Gateway to SynerexServer
func (*GatewayMsg) Descriptor
deprecated
added in
v0.1.1
func (*GatewayMsg) Descriptor() ([]byte, []int)
Deprecated: Use GatewayMsg.ProtoReflect.Descriptor instead.
func (*GatewayMsg) GetDemand ¶ added in v0.1.1
func (x *GatewayMsg) GetDemand() *Demand
func (*GatewayMsg) GetMbus ¶ added in v0.1.1
func (x *GatewayMsg) GetMbus() *Mbus
func (*GatewayMsg) GetMbusMsg ¶ added in v0.1.1
func (x *GatewayMsg) GetMbusMsg() *MbusMsg
func (*GatewayMsg) GetMsgOneof ¶ added in v0.1.1
func (m *GatewayMsg) GetMsgOneof() isGatewayMsg_MsgOneof
func (*GatewayMsg) GetMsgType ¶ added in v0.1.1
func (x *GatewayMsg) GetMsgType() MsgType
func (*GatewayMsg) GetSrcSynerexId ¶ added in v0.1.1
func (x *GatewayMsg) GetSrcSynerexId() uint64
func (*GatewayMsg) GetSupply ¶ added in v0.1.1
func (x *GatewayMsg) GetSupply() *Supply
func (*GatewayMsg) GetTarget ¶ added in v0.1.1
func (x *GatewayMsg) GetTarget() *Target
func (*GatewayMsg) ProtoMessage ¶ added in v0.1.1
func (*GatewayMsg) ProtoMessage()
func (*GatewayMsg) ProtoReflect ¶ added in v0.4.0
func (x *GatewayMsg) ProtoReflect() protoreflect.Message
func (*GatewayMsg) Reset ¶ added in v0.1.1
func (x *GatewayMsg) Reset()
func (*GatewayMsg) String ¶ added in v0.1.1
func (x *GatewayMsg) String() string
type GatewayMsg_Demand ¶ added in v0.1.1
type GatewayMsg_Demand struct {
Demand *Demand `protobuf:"bytes,3,opt,name=demand,proto3,oneof"`
}
type GatewayMsg_Mbus ¶ added in v0.1.1
type GatewayMsg_Mbus struct {
Mbus *Mbus `protobuf:"bytes,6,opt,name=mbus,proto3,oneof"`
}
type GatewayMsg_MbusMsg ¶ added in v0.1.1
type GatewayMsg_MbusMsg struct {
MbusMsg *MbusMsg `protobuf:"bytes,7,opt,name=mbus_msg,json=mbusMsg,proto3,oneof"`
}
type GatewayMsg_Supply ¶ added in v0.1.1
type GatewayMsg_Supply struct {
Supply *Supply `protobuf:"bytes,4,opt,name=supply,proto3,oneof"`
}
type GatewayMsg_Target ¶ added in v0.1.1
type GatewayMsg_Target struct {
Target *Target `protobuf:"bytes,5,opt,name=target,proto3,oneof"`
}
type GatewayType ¶ added in v0.1.1
type GatewayType int32
const ( GatewayType_BIDIRECTIONAL GatewayType = 0 // normal gateway GatewayType_WRITE_ONLY GatewayType = 1 // no need to receive GatewayType_READ_ONLY GatewayType = 2 // )
func (GatewayType) Descriptor ¶ added in v0.4.0
func (GatewayType) Descriptor() protoreflect.EnumDescriptor
func (GatewayType) Enum ¶ added in v0.4.0
func (x GatewayType) Enum() *GatewayType
func (GatewayType) EnumDescriptor
deprecated
added in
v0.1.1
func (GatewayType) EnumDescriptor() ([]byte, []int)
Deprecated: Use GatewayType.Descriptor instead.
func (GatewayType) Number ¶ added in v0.4.0
func (x GatewayType) Number() protoreflect.EnumNumber
func (GatewayType) String ¶ added in v0.1.1
func (x GatewayType) String() string
func (GatewayType) Type ¶ added in v0.4.0
func (GatewayType) Type() protoreflect.EnumType
type Mbus ¶
type Mbus struct { ClientId uint64 `protobuf:"fixed64,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` MbusId uint64 `protobuf:"fixed64,2,opt,name=mbus_id,json=mbusId,proto3" json:"mbus_id,omitempty"` ArgJson string `protobuf:"bytes,3,opt,name=arg_json,json=argJson,proto3" json:"arg_json,omitempty"` // for mbus description // contains filtered or unexported fields }
func (*Mbus) Descriptor
deprecated
func (*Mbus) GetArgJson ¶
func (*Mbus) GetClientId ¶
func (*Mbus) ProtoMessage ¶
func (*Mbus) ProtoMessage()
func (*Mbus) ProtoReflect ¶ added in v0.4.0
func (x *Mbus) ProtoReflect() protoreflect.Message
type MbusMsg ¶
type MbusMsg struct { MsgId uint64 `protobuf:"fixed64,1,opt,name=msg_id,json=msgId,proto3" json:"msg_id,omitempty"` // if 0 for close message SenderId uint64 `protobuf:"fixed64,2,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"` TargetId uint64 `protobuf:"fixed64,3,opt,name=target_id,json=targetId,proto3" json:"target_id,omitempty"` // for target // if 0 for broadcast in mbus MbusId uint64 `protobuf:"fixed64,4,opt,name=mbus_id,json=mbusId,proto3" json:"mbus_id,omitempty"` MsgType uint32 `protobuf:"varint,5,opt,name=msg_type,json=msgType,proto3" json:"msg_type,omitempty"` // for message type MsgInfo string `protobuf:"bytes,6,opt,name=msg_info,json=msgInfo,proto3" json:"msg_info,omitempty"` // for abstract information ArgJson string `protobuf:"bytes,7,opt,name=arg_json,json=argJson,proto3" json:"arg_json,omitempty"` Cdata *Content `protobuf:"bytes,8,opt,name=cdata,proto3" json:"cdata,omitempty"` // content data (enbedded from v0.4.0) // contains filtered or unexported fields }
func (*MbusMsg) Descriptor
deprecated
func (*MbusMsg) GetArgJson ¶
func (*MbusMsg) GetMsgInfo ¶
func (*MbusMsg) GetMsgType ¶
func (*MbusMsg) GetSenderId ¶
func (*MbusMsg) GetTargetId ¶
func (*MbusMsg) ProtoMessage ¶
func (*MbusMsg) ProtoMessage()
func (*MbusMsg) ProtoReflect ¶ added in v0.4.0
func (x *MbusMsg) ProtoReflect() protoreflect.Message
type MbusOpt ¶ added in v0.4.0
type MbusOpt struct { MbusType MbusOpt_MbusType `protobuf:"varint,1,opt,name=mbus_type,json=mbusType,proto3,enum=api.MbusOpt_MbusType" json:"mbus_type,omitempty"` Subscribers []uint64 `protobuf:"fixed64,2,rep,packed,name=subscribers,proto3" json:"subscribers,omitempty"` // use this for limiting subscribers // contains filtered or unexported fields }
options for creating Mbus from v0.4.0
func (*MbusOpt) Descriptor
deprecated
added in
v0.4.0
func (*MbusOpt) GetMbusType ¶ added in v0.4.0
func (x *MbusOpt) GetMbusType() MbusOpt_MbusType
func (*MbusOpt) GetSubscribers ¶ added in v0.4.0
func (*MbusOpt) ProtoMessage ¶ added in v0.4.0
func (*MbusOpt) ProtoMessage()
func (*MbusOpt) ProtoReflect ¶ added in v0.4.0
func (x *MbusOpt) ProtoReflect() protoreflect.Message
type MbusOpt_MbusType ¶ added in v0.4.0
type MbusOpt_MbusType int32
const ( MbusOpt_PUBLIC MbusOpt_MbusType = 0 MbusOpt_PRIVATE MbusOpt_MbusType = 1 )
func (MbusOpt_MbusType) Descriptor ¶ added in v0.4.0
func (MbusOpt_MbusType) Descriptor() protoreflect.EnumDescriptor
func (MbusOpt_MbusType) Enum ¶ added in v0.4.0
func (x MbusOpt_MbusType) Enum() *MbusOpt_MbusType
func (MbusOpt_MbusType) EnumDescriptor
deprecated
added in
v0.4.0
func (MbusOpt_MbusType) EnumDescriptor() ([]byte, []int)
Deprecated: Use MbusOpt_MbusType.Descriptor instead.
func (MbusOpt_MbusType) Number ¶ added in v0.4.0
func (x MbusOpt_MbusType) Number() protoreflect.EnumNumber
func (MbusOpt_MbusType) String ¶ added in v0.4.0
func (x MbusOpt_MbusType) String() string
func (MbusOpt_MbusType) Type ¶ added in v0.4.0
func (MbusOpt_MbusType) Type() protoreflect.EnumType
type MbusState ¶ added in v0.4.0
type MbusState struct { MbusId uint64 `protobuf:"fixed64,1,opt,name=mbus_id,json=mbusId,proto3" json:"mbus_id,omitempty"` Status MbusState_MbusStatus `protobuf:"varint,2,opt,name=status,proto3,enum=api.MbusState_MbusStatus" json:"status,omitempty"` Subscribers []uint64 `protobuf:"fixed64,3,rep,packed,name=subscribers,proto3" json:"subscribers,omitempty"` // subscriber count (only with status= SUBSCRIBERS) // contains filtered or unexported fields }
message for obtaining mbus state from 0.4.0
func (*MbusState) Descriptor
deprecated
added in
v0.4.0
func (*MbusState) GetStatus ¶ added in v0.4.0
func (x *MbusState) GetStatus() MbusState_MbusStatus
func (*MbusState) GetSubscribers ¶ added in v0.4.0
func (*MbusState) ProtoMessage ¶ added in v0.4.0
func (*MbusState) ProtoMessage()
func (*MbusState) ProtoReflect ¶ added in v0.4.0
func (x *MbusState) ProtoReflect() protoreflect.Message
type MbusState_MbusStatus ¶ added in v0.4.0
type MbusState_MbusStatus int32
const ( MbusState_INTIALIZED MbusState_MbusStatus = 0 // just created (no subscribers) MbusState_SUBSCRIBERS MbusState_MbusStatus = 1 // there are some subscribers MbusState_CLOSED MbusState_MbusStatus = 2 // closed mbus MbusState_INVALID MbusState_MbusStatus = 3 // no mbus is available with the mbus_id or hidden. )
func (MbusState_MbusStatus) Descriptor ¶ added in v0.4.0
func (MbusState_MbusStatus) Descriptor() protoreflect.EnumDescriptor
func (MbusState_MbusStatus) Enum ¶ added in v0.4.0
func (x MbusState_MbusStatus) Enum() *MbusState_MbusStatus
func (MbusState_MbusStatus) EnumDescriptor
deprecated
added in
v0.4.0
func (MbusState_MbusStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use MbusState_MbusStatus.Descriptor instead.
func (MbusState_MbusStatus) Number ¶ added in v0.4.0
func (x MbusState_MbusStatus) Number() protoreflect.EnumNumber
func (MbusState_MbusStatus) String ¶ added in v0.4.0
func (x MbusState_MbusStatus) String() string
func (MbusState_MbusStatus) Type ¶ added in v0.4.0
func (MbusState_MbusStatus) Type() protoreflect.EnumType
type MsgType ¶ added in v0.1.1
type MsgType int32
func (MsgType) Descriptor ¶ added in v0.4.0
func (MsgType) Descriptor() protoreflect.EnumDescriptor
func (MsgType) EnumDescriptor
deprecated
added in
v0.1.1
func (MsgType) Number ¶ added in v0.4.0
func (x MsgType) Number() protoreflect.EnumNumber
func (MsgType) Type ¶ added in v0.4.0
func (MsgType) Type() protoreflect.EnumType
type ProviderID ¶ added in v0.3.1
type ProviderID struct { ClientId uint64 `protobuf:"fixed64,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` ArgJson string `protobuf:"bytes,3,opt,name=arg_json,json=argJson,proto3" json:"arg_json,omitempty"` // for Any Argument // contains filtered or unexported fields }
func (*ProviderID) Descriptor
deprecated
added in
v0.3.1
func (*ProviderID) Descriptor() ([]byte, []int)
Deprecated: Use ProviderID.ProtoReflect.Descriptor instead.
func (*ProviderID) GetArgJson ¶ added in v0.3.1
func (x *ProviderID) GetArgJson() string
func (*ProviderID) GetClientId ¶ added in v0.3.1
func (x *ProviderID) GetClientId() uint64
func (*ProviderID) ProtoMessage ¶ added in v0.3.1
func (*ProviderID) ProtoMessage()
func (*ProviderID) ProtoReflect ¶ added in v0.4.0
func (x *ProviderID) ProtoReflect() protoreflect.Message
func (*ProviderID) Reset ¶ added in v0.3.1
func (x *ProviderID) Reset()
func (*ProviderID) String ¶ added in v0.3.1
func (x *ProviderID) String() string
type Response ¶
type Response struct { Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` Err string `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶ added in v0.4.0
func (x *Response) ProtoReflect() protoreflect.Message
type Supply ¶
type Supply struct { Id uint64 `protobuf:"fixed64,1,opt,name=id,proto3" json:"id,omitempty"` SenderId uint64 `protobuf:"fixed64,2,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"` TargetId uint64 `protobuf:"fixed64,3,opt,name=target_id,json=targetId,proto3" json:"target_id,omitempty"` // for message id (not for sender_id) ChannelType uint32 `protobuf:"varint,4,opt,name=channel_type,json=channelType,proto3" json:"channel_type,omitempty"` // channel type SupplyName string `protobuf:"bytes,5,opt,name=supply_name,json=supplyName,proto3" json:"supply_name,omitempty"` Ts *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=ts,proto3" json:"ts,omitempty"` ArgJson string `protobuf:"bytes,7,opt,name=arg_json,json=argJson,proto3" json:"arg_json,omitempty"` MbusId uint64 `protobuf:"fixed64,8,opt,name=mbus_id,json=mbusId,proto3" json:"mbus_id,omitempty"` // new mbus id for select demand. Cdata *Content `protobuf:"bytes,9,opt,name=cdata,proto3" json:"cdata,omitempty"` // content data // contains filtered or unexported fields }
func (*Supply) Descriptor
deprecated
func (*Supply) GetArgJson ¶
func (*Supply) GetChannelType ¶
func (*Supply) GetSenderId ¶
func (*Supply) GetSupplyName ¶
func (*Supply) GetTargetId ¶
func (*Supply) GetTs ¶
func (x *Supply) GetTs() *timestamppb.Timestamp
func (*Supply) ProtoMessage ¶
func (*Supply) ProtoMessage()
func (*Supply) ProtoReflect ¶ added in v0.4.0
func (x *Supply) ProtoReflect() protoreflect.Message
type SynerexClient ¶
type SynerexClient interface { NotifyDemand(ctx context.Context, in *Demand, opts ...grpc.CallOption) (*Response, error) NotifySupply(ctx context.Context, in *Supply, opts ...grpc.CallOption) (*Response, error) ProposeDemand(ctx context.Context, in *Demand, opts ...grpc.CallOption) (*Response, error) ProposeSupply(ctx context.Context, in *Supply, opts ...grpc.CallOption) (*Response, error) SelectSupply(ctx context.Context, in *Target, opts ...grpc.CallOption) (*ConfirmResponse, error) SelectModifiedSupply(ctx context.Context, in *Supply, opts ...grpc.CallOption) (*ConfirmResponse, error) SelectDemand(ctx context.Context, in *Target, opts ...grpc.CallOption) (*ConfirmResponse, error) // rpc SelectModifiedDemand(Demand) returns (ConfirmResponse) {} // select with modification(since 0.5.1) Confirm(ctx context.Context, in *Target, opts ...grpc.CallOption) (*Response, error) SubscribeDemand(ctx context.Context, in *Channel, opts ...grpc.CallOption) (Synerex_SubscribeDemandClient, error) SubscribeSupply(ctx context.Context, in *Channel, opts ...grpc.CallOption) (Synerex_SubscribeSupplyClient, error) CreateMbus(ctx context.Context, in *MbusOpt, opts ...grpc.CallOption) (*Mbus, error) CloseMbus(ctx context.Context, in *Mbus, opts ...grpc.CallOption) (*Response, error) SubscribeMbus(ctx context.Context, in *Mbus, opts ...grpc.CallOption) (Synerex_SubscribeMbusClient, error) SendMbusMsg(ctx context.Context, in *MbusMsg, opts ...grpc.CallOption) (*Response, error) GetMbusState(ctx context.Context, in *Mbus, opts ...grpc.CallOption) (*MbusState, error) SubscribeGateway(ctx context.Context, in *GatewayInfo, opts ...grpc.CallOption) (Synerex_SubscribeGatewayClient, error) ForwardToGateway(ctx context.Context, in *GatewayMsg, opts ...grpc.CallOption) (*Response, error) CloseDemandChannel(ctx context.Context, in *Channel, opts ...grpc.CallOption) (*Response, error) CloseSupplyChannel(ctx context.Context, in *Channel, opts ...grpc.CallOption) (*Response, error) CloseAllChannels(ctx context.Context, in *ProviderID, opts ...grpc.CallOption) (*Response, error) }
SynerexClient is the client API for Synerex service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSynerexClient ¶
func NewSynerexClient(cc grpc.ClientConnInterface) SynerexClient
type SynerexServer ¶
type SynerexServer interface { NotifyDemand(context.Context, *Demand) (*Response, error) NotifySupply(context.Context, *Supply) (*Response, error) ProposeDemand(context.Context, *Demand) (*Response, error) ProposeSupply(context.Context, *Supply) (*Response, error) SelectSupply(context.Context, *Target) (*ConfirmResponse, error) SelectModifiedSupply(context.Context, *Supply) (*ConfirmResponse, error) SelectDemand(context.Context, *Target) (*ConfirmResponse, error) // rpc SelectModifiedDemand(Demand) returns (ConfirmResponse) {} // select with modification(since 0.5.1) Confirm(context.Context, *Target) (*Response, error) SubscribeDemand(*Channel, Synerex_SubscribeDemandServer) error SubscribeSupply(*Channel, Synerex_SubscribeSupplyServer) error CreateMbus(context.Context, *MbusOpt) (*Mbus, error) CloseMbus(context.Context, *Mbus) (*Response, error) SubscribeMbus(*Mbus, Synerex_SubscribeMbusServer) error SendMbusMsg(context.Context, *MbusMsg) (*Response, error) GetMbusState(context.Context, *Mbus) (*MbusState, error) SubscribeGateway(*GatewayInfo, Synerex_SubscribeGatewayServer) error ForwardToGateway(context.Context, *GatewayMsg) (*Response, error) CloseDemandChannel(context.Context, *Channel) (*Response, error) CloseSupplyChannel(context.Context, *Channel) (*Response, error) CloseAllChannels(context.Context, *ProviderID) (*Response, error) }
SynerexServer is the server API for Synerex service.
type Synerex_SubscribeDemandClient ¶
type Synerex_SubscribeDemandClient interface { Recv() (*Demand, error) grpc.ClientStream }
type Synerex_SubscribeDemandServer ¶
type Synerex_SubscribeDemandServer interface { Send(*Demand) error grpc.ServerStream }
type Synerex_SubscribeGatewayClient ¶ added in v0.1.1
type Synerex_SubscribeGatewayClient interface { Recv() (*GatewayMsg, error) grpc.ClientStream }
type Synerex_SubscribeGatewayServer ¶ added in v0.1.1
type Synerex_SubscribeGatewayServer interface { Send(*GatewayMsg) error grpc.ServerStream }
type Synerex_SubscribeMbusClient ¶
type Synerex_SubscribeMbusClient interface { Recv() (*MbusMsg, error) grpc.ClientStream }
type Synerex_SubscribeMbusServer ¶
type Synerex_SubscribeMbusServer interface { Send(*MbusMsg) error grpc.ServerStream }
type Synerex_SubscribeSupplyClient ¶
type Synerex_SubscribeSupplyClient interface { Recv() (*Supply, error) grpc.ClientStream }
type Synerex_SubscribeSupplyServer ¶
type Synerex_SubscribeSupplyServer interface { Send(*Supply) error grpc.ServerStream }
type Target ¶
type Target struct { Id uint64 `protobuf:"fixed64,1,opt,name=id,proto3" json:"id,omitempty"` SenderId uint64 `protobuf:"fixed64,2,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"` TargetId uint64 `protobuf:"fixed64,3,opt,name=target_id,json=targetId,proto3" json:"target_id,omitempty"` // for target ChannelType uint32 `protobuf:"varint,4,opt,name=channel_type,json=channelType,proto3" json:"channel_type,omitempty"` // channel type Wait *durationpb.Duration `protobuf:"bytes,5,opt,name=wait,proto3" json:"wait,omitempty"` MbusId uint64 `protobuf:"fixed64,6,opt,name=mbus_id,json=mbusId,proto3" json:"mbus_id,omitempty"` // if you need message bus, set Mbus with mbus_id = 1 // contains filtered or unexported fields }
func (*Target) Descriptor
deprecated
func (*Target) GetChannelType ¶
func (*Target) GetSenderId ¶
func (*Target) GetTargetId ¶
func (*Target) GetWait ¶
func (x *Target) GetWait() *durationpb.Duration
func (*Target) ProtoMessage ¶
func (*Target) ProtoMessage()
func (*Target) ProtoReflect ¶ added in v0.4.0
func (x *Target) ProtoReflect() protoreflect.Message
type UnimplementedSynerexServer ¶ added in v0.4.0
type UnimplementedSynerexServer struct { }
UnimplementedSynerexServer can be embedded to have forward compatible implementations.
func (*UnimplementedSynerexServer) CloseAllChannels ¶ added in v0.4.0
func (*UnimplementedSynerexServer) CloseAllChannels(context.Context, *ProviderID) (*Response, error)
func (*UnimplementedSynerexServer) CloseDemandChannel ¶ added in v0.4.0
func (*UnimplementedSynerexServer) CloseSupplyChannel ¶ added in v0.4.0
func (*UnimplementedSynerexServer) CreateMbus ¶ added in v0.4.0
func (*UnimplementedSynerexServer) ForwardToGateway ¶ added in v0.4.0
func (*UnimplementedSynerexServer) ForwardToGateway(context.Context, *GatewayMsg) (*Response, error)
func (*UnimplementedSynerexServer) GetMbusState ¶ added in v0.4.0
func (*UnimplementedSynerexServer) NotifyDemand ¶ added in v0.4.0
func (*UnimplementedSynerexServer) NotifySupply ¶ added in v0.4.0
func (*UnimplementedSynerexServer) ProposeDemand ¶ added in v0.4.0
func (*UnimplementedSynerexServer) ProposeSupply ¶ added in v0.4.0
func (*UnimplementedSynerexServer) SelectDemand ¶ added in v0.4.0
func (*UnimplementedSynerexServer) SelectDemand(context.Context, *Target) (*ConfirmResponse, error)
func (*UnimplementedSynerexServer) SelectModifiedSupply ¶ added in v0.5.0
func (*UnimplementedSynerexServer) SelectModifiedSupply(context.Context, *Supply) (*ConfirmResponse, error)
func (*UnimplementedSynerexServer) SelectSupply ¶ added in v0.4.0
func (*UnimplementedSynerexServer) SelectSupply(context.Context, *Target) (*ConfirmResponse, error)
func (*UnimplementedSynerexServer) SendMbusMsg ¶ added in v0.4.1
func (*UnimplementedSynerexServer) SubscribeDemand ¶ added in v0.4.0
func (*UnimplementedSynerexServer) SubscribeDemand(*Channel, Synerex_SubscribeDemandServer) error
func (*UnimplementedSynerexServer) SubscribeGateway ¶ added in v0.4.0
func (*UnimplementedSynerexServer) SubscribeGateway(*GatewayInfo, Synerex_SubscribeGatewayServer) error
func (*UnimplementedSynerexServer) SubscribeMbus ¶ added in v0.4.0
func (*UnimplementedSynerexServer) SubscribeMbus(*Mbus, Synerex_SubscribeMbusServer) error
func (*UnimplementedSynerexServer) SubscribeSupply ¶ added in v0.4.0
func (*UnimplementedSynerexServer) SubscribeSupply(*Channel, Synerex_SubscribeSupplyServer) error