Documentation ¶
Index ¶
- Constants
- func CreateSchema(db bun.IDB) error
- type CableService
- func (s *CableService) Clone(ctx context.Context, in *edges.CloneCableRequest) (*pb.MyBool, error)
- func (s *CableService) Create(ctx context.Context, in *pb.Cable) (*pb.Cable, error)
- func (s *CableService) Delete(ctx context.Context, in *pb.Id) (*pb.MyBool, error)
- func (s *CableService) Link(ctx context.Context, in *edges.LinkCableRequest) (*pb.MyBool, error)
- func (s *CableService) List(ctx context.Context, in *edges.ListCableRequest) (*edges.ListCableResponse, error)
- func (s *CableService) Pull(ctx context.Context, in *edges.PullCableRequest) (*edges.PullCableResponse, error)
- func (s *CableService) Update(ctx context.Context, in *pb.Cable) (*pb.Cable, error)
- func (s *CableService) View(ctx context.Context, in *pb.Id) (*pb.Cable, error)
- func (s *CableService) ViewByName(ctx context.Context, in *pb.Name) (*pb.Cable, error)
- func (s *CableService) ViewWithDeleted(ctx context.Context, in *pb.Id) (*pb.Cable, error)
- type ControlService
- func (s *ControlService) AddSlotClient(slotID string, client slots.ControlServiceClient)
- func (s *ControlService) AddSourceServer(sourceID string, server slots.ControlServiceServer)
- func (s *ControlService) DeleteSlotClient(slotID string, client slots.ControlServiceClient)
- func (s *ControlService) GetSlotClient(slotID string) types.Option[slots.ControlServiceClient]
- func (s *ControlService) GetSourceServer(sourceID string) types.Option[slots.ControlServiceServer]
- func (s *ControlService) GetTagValue(ctx context.Context, in *pb.Id) (*pb.TagValue, error)
- func (s *ControlService) LinkSource(slotID string, sourceID string, status int32)
- func (s *ControlService) RemoveSourceServer(sourceID string, server slots.ControlServiceServer)
- func (s *ControlService) SetTagValue(ctx context.Context, in *pb.TagValue) (*pb.TagValue, error)
- type DataService
- func (s *DataService) CacheTagValue(tag *model.Tag, value nson.Value)
- func (s *DataService) Compile(ctx context.Context, in *edges.DataQueryRequest) (*pb.Message, error)
- func (s *DataService) Query(in *edges.DataQueryRequest, stream edges.DataService_QueryServer) error
- func (s *DataService) QueryTag(in *edges.DataQueryTagRequest, stream edges.DataService_QueryTagServer) error
- func (s *DataService) Upload(ctx context.Context, in *edges.DataUploadRequest) (*edges.DataUploadResponse, error)
- type DeviceService
- func (s *DeviceService) Create(ctx context.Context, in *pb.Device) (*pb.Device, error)
- func (s *DeviceService) Destory(ctx context.Context, in *pb.MyEmpty) (*pb.MyBool, error)
- func (s *DeviceService) Update(ctx context.Context, in *pb.Device) (*pb.Device, error)
- func (s *DeviceService) View(ctx context.Context, in *pb.MyEmpty) (*pb.Device, error)
- type EdgeOption
- func WithDeviceID(id, secret string) EdgeOption
- func WithInfluxDB(influxdb *db.InfluxDB) EdgeOption
- func WithLinkStatusTTL(d time.Duration) EdgeOption
- func WithLogger(logger *zap.Logger) EdgeOption
- func WithNode(addr string, options []grpc.DialOption) EdgeOption
- func WithQuic(addr string, tlsConfig *tls.Config, quicConfig *quic.Config) EdgeOption
- func WithSyncLinkStatus(d time.Duration) EdgeOption
- func WithSyncWireValueFromTagValue(d time.Duration) EdgeOption
- func WithTokenRefresh(d time.Duration) EdgeOption
- func WithValueCacheTTL(d time.Duration) EdgeOption
- type EdgeService
- func (es *EdgeService) Context() context.Context
- func (es *EdgeService) GetCable() *CableService
- func (es *EdgeService) GetControl() *ControlService
- func (es *EdgeService) GetDB() *bun.DB
- func (es *EdgeService) GetData() *DataService
- func (es *EdgeService) GetDevice() *DeviceService
- func (es *EdgeService) GetInfluxDB() types.Option[*db.InfluxDB]
- func (es *EdgeService) GetNode() *NodeService
- func (es *EdgeService) GetOption() *OptionService
- func (es *EdgeService) GetPort() *PortService
- func (es *EdgeService) GetProxy() *ProxyService
- func (es *EdgeService) GetQuic() types.Option[*QuicService]
- func (es *EdgeService) GetSlot() *SlotService
- func (es *EdgeService) GetSource() *SourceService
- func (es *EdgeService) GetStatus() *StatusService
- func (es *EdgeService) GetSync() *SyncService
- func (es *EdgeService) GetTag() *TagService
- func (es *EdgeService) GetVar() *VarService
- func (es *EdgeService) GetWire() *WireService
- func (es *EdgeService) Logger() *zap.Logger
- func (es *EdgeService) Register(server *grpc.Server)
- func (es *EdgeService) Start()
- func (es *EdgeService) Stop()
- type NodeService
- func (s *NodeService) CableServiceClient() nodes.CableServiceClient
- func (s *NodeService) DataServiceClient() nodes.DataServiceClient
- func (s *NodeService) DeviceServiceClient() nodes.DeviceServiceClient
- func (s *NodeService) GetToken() string
- func (s *NodeService) OptionServiceClient() nodes.OptionServiceClient
- func (s *NodeService) PortServiceClient() nodes.PortServiceClient
- func (s *NodeService) ProxyServiceClient() nodes.ProxyServiceClient
- func (s *NodeService) RrpcServiceClient() rgrpc.RgrpcServiceClient
- func (s *NodeService) SlotServiceClient() nodes.SlotServiceClient
- func (s *NodeService) SourceServiceClient() nodes.SourceServiceClient
- func (s *NodeService) Start()
- func (s *NodeService) Stop()
- func (s *NodeService) SyncServiceClient() nodes.SyncServiceClient
- func (s *NodeService) TagServiceClient() nodes.TagServiceClient
- func (s *NodeService) VarServiceClient() nodes.VarServiceClient
- func (s *NodeService) WireServiceClient() nodes.WireServiceClient
- type OptionService
- func (s *OptionService) Clone(ctx context.Context, in *edges.CloneOptionRequest) (*pb.MyBool, error)
- func (s *OptionService) Create(ctx context.Context, in *pb.Option) (*pb.Option, error)
- func (s *OptionService) Delete(ctx context.Context, in *pb.Id) (*pb.MyBool, error)
- func (s *OptionService) Get(ctx context.Context, name string) (string, error)
- func (s *OptionService) Has(ctx context.Context, name string) (bool, error)
- func (s *OptionService) List(ctx context.Context, in *edges.ListOptionRequest) (*edges.ListOptionResponse, error)
- func (s *OptionService) Pull(ctx context.Context, in *edges.PullOptionRequest) (*edges.PullOptionResponse, error)
- func (s *OptionService) Set(ctx context.Context, name, value string) error
- func (s *OptionService) Update(ctx context.Context, in *pb.Option) (*pb.Option, error)
- func (s *OptionService) View(ctx context.Context, in *pb.Id) (*pb.Option, error)
- func (s *OptionService) ViewByName(ctx context.Context, in *pb.Name) (*pb.Option, error)
- func (s *OptionService) ViewWithDeleted(ctx context.Context, in *pb.Id) (*pb.Option, error)
- type PortService
- func (s *PortService) Clone(ctx context.Context, in *edges.ClonePortRequest) (*pb.MyBool, error)
- func (s *PortService) Create(ctx context.Context, in *pb.Port) (*pb.Port, error)
- func (s *PortService) Delete(ctx context.Context, in *pb.Id) (*pb.MyBool, error)
- func (s *PortService) Link(ctx context.Context, in *edges.LinkPortRequest) (*pb.MyBool, error)
- func (s *PortService) List(ctx context.Context, in *edges.ListPortRequest) (*edges.ListPortResponse, error)
- func (s *PortService) Pull(ctx context.Context, in *edges.PullPortRequest) (*edges.PullPortResponse, error)
- func (s *PortService) Update(ctx context.Context, in *pb.Port) (*pb.Port, error)
- func (s *PortService) View(ctx context.Context, in *pb.Id) (*pb.Port, error)
- func (s *PortService) ViewByName(ctx context.Context, in *pb.Name) (*pb.Port, error)
- func (s *PortService) ViewWithDeleted(ctx context.Context, in *pb.Id) (*pb.Port, error)
- type ProxyService
- func (s *ProxyService) Clone(ctx context.Context, in *edges.CloneProxyRequest) (*pb.MyBool, error)
- func (s *ProxyService) Create(ctx context.Context, in *pb.Proxy) (*pb.Proxy, error)
- func (s *ProxyService) Delete(ctx context.Context, in *pb.Id) (*pb.MyBool, error)
- func (s *ProxyService) Link(ctx context.Context, in *edges.LinkProxyRequest) (*pb.MyBool, error)
- func (s *ProxyService) List(ctx context.Context, in *edges.ListProxyRequest) (*edges.ListProxyResponse, error)
- func (s *ProxyService) Pull(ctx context.Context, in *edges.PullProxyRequest) (*edges.PullProxyResponse, error)
- func (s *ProxyService) Update(ctx context.Context, in *pb.Proxy) (*pb.Proxy, error)
- func (s *ProxyService) View(ctx context.Context, in *pb.Id) (*pb.Proxy, error)
- func (s *ProxyService) ViewByName(ctx context.Context, in *pb.Name) (*pb.Proxy, error)
- func (s *ProxyService) ViewWithDeleted(ctx context.Context, in *pb.Id) (*pb.Proxy, error)
- type QuicService
- type SlotService
- func (s *SlotService) Clone(ctx context.Context, in *edges.CloneSlotRequest) (*pb.MyBool, error)
- func (s *SlotService) Create(ctx context.Context, in *pb.Slot) (*pb.Slot, error)
- func (s *SlotService) Delete(ctx context.Context, in *pb.Id) (*pb.MyBool, error)
- func (s *SlotService) Link(ctx context.Context, in *edges.LinkSlotRequest) (*pb.MyBool, error)
- func (s *SlotService) List(ctx context.Context, in *edges.ListSlotRequest) (*edges.ListSlotResponse, error)
- func (s *SlotService) Pull(ctx context.Context, in *edges.PullSlotRequest) (*edges.PullSlotResponse, error)
- func (s *SlotService) Update(ctx context.Context, in *pb.Slot) (*pb.Slot, error)
- func (s *SlotService) View(ctx context.Context, in *pb.Id) (*pb.Slot, error)
- func (s *SlotService) ViewByName(ctx context.Context, in *pb.Name) (*pb.Slot, error)
- func (s *SlotService) ViewWithDeleted(ctx context.Context, in *pb.Id) (*pb.Slot, error)
- type SourceService
- func (s *SourceService) Clone(ctx context.Context, in *edges.CloneSourceRequest) (*pb.MyBool, error)
- func (s *SourceService) Create(ctx context.Context, in *pb.Source) (*pb.Source, error)
- func (s *SourceService) Delete(ctx context.Context, in *pb.Id) (*pb.MyBool, error)
- func (s *SourceService) Link(ctx context.Context, in *edges.LinkSourceRequest) (*pb.MyBool, error)
- func (s *SourceService) List(ctx context.Context, in *edges.ListSourceRequest) (*edges.ListSourceResponse, error)
- func (s *SourceService) Pull(ctx context.Context, in *edges.PullSourceRequest) (*edges.PullSourceResponse, error)
- func (s *SourceService) Update(ctx context.Context, in *pb.Source) (*pb.Source, error)
- func (s *SourceService) View(ctx context.Context, in *pb.Id) (*pb.Source, error)
- func (s *SourceService) ViewByName(ctx context.Context, in *pb.Name) (*pb.Source, error)
- func (s *SourceService) ViewWithDeleted(ctx context.Context, in *pb.Id) (*pb.Source, error)
- type StatusService
- func (s *StatusService) GetDeviceLink() int32
- func (s *StatusService) GetDeviceLinkValue() types.Option[cache.Value[int32]]
- func (s *StatusService) GetLink(key string) int32
- func (s *StatusService) GetLinkValue(key string) types.Option[cache.Value[int32]]
- func (s *StatusService) SetDeviceLink(status int32)
- func (s *StatusService) SetLink(key string, status int32)
- type SyncService
- func (s *SyncService) GetCableUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
- func (s *SyncService) GetDeviceUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
- func (s *SyncService) GetOptionUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
- func (s *SyncService) GetPortUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
- func (s *SyncService) GetProxyUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
- func (s *SyncService) GetSlotUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
- func (s *SyncService) GetSourceUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
- func (s *SyncService) GetTagUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
- func (s *SyncService) GetTagValueUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
- func (s *SyncService) GetVarUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
- func (s *SyncService) GetWireUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
- func (s *SyncService) GetWireValueUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
- func (s *SyncService) SetCableUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
- func (s *SyncService) SetDeviceUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
- func (s *SyncService) SetOptionUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
- func (s *SyncService) SetPortUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
- func (s *SyncService) SetProxyUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
- func (s *SyncService) SetSlotUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
- func (s *SyncService) SetSourceUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
- func (s *SyncService) SetTagUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
- func (s *SyncService) SetTagValueUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
- func (s *SyncService) SetVarUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
- func (s *SyncService) SetWireUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
- func (s *SyncService) SetWireValueUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
- func (s *SyncService) WaitDeviceUpdated(in *pb.MyEmpty, stream edges.SyncService_WaitDeviceUpdatedServer) error
- func (s *SyncService) WaitDeviceUpdated2(ctx context.Context) chan bool
- func (s *SyncService) WaitTagValueUpdated(in *pb.MyEmpty, stream edges.SyncService_WaitTagValueUpdatedServer) error
- func (s *SyncService) WaitTagValueUpdated2(ctx context.Context) chan bool
- func (s *SyncService) WaitWireValueUpdated(in *pb.MyEmpty, stream edges.SyncService_WaitWireValueUpdatedServer) error
- func (s *SyncService) WaitWireValueUpdated2(ctx context.Context) chan bool
- type TagService
- func (s *TagService) Clone(ctx context.Context, in *edges.CloneTagRequest) (*pb.MyBool, error)
- func (s *TagService) Create(ctx context.Context, in *pb.Tag) (*pb.Tag, error)
- func (s *TagService) Delete(ctx context.Context, in *pb.Id) (*pb.MyBool, error)
- func (s *TagService) DeleteValue(ctx context.Context, in *pb.Id) (*pb.MyBool, error)
- func (s *TagService) GetTagValue(id string) nson.Value
- func (s *TagService) GetTagValueValue(id string) types.Option[cache.Value[nson.Value]]
- func (s *TagService) GetValue(ctx context.Context, in *pb.Id) (*pb.TagValue, error)
- func (s *TagService) GetValueByName(ctx context.Context, in *pb.Name) (*pb.TagNameValue, error)
- func (s *TagService) List(ctx context.Context, in *edges.ListTagRequest) (*edges.ListTagResponse, error)
- func (s *TagService) Pull(ctx context.Context, in *edges.PullTagRequest) (*edges.PullTagResponse, error)
- func (s *TagService) PullValue(ctx context.Context, in *edges.PullTagValueRequest) (*edges.PullTagValueResponse, error)
- func (s *TagService) SetTagValue(id string, value nson.Value)
- func (s *TagService) SetValue(ctx context.Context, in *pb.TagValue) (*pb.MyBool, error)
- func (s *TagService) SetValueByName(ctx context.Context, in *pb.TagNameValue) (*pb.MyBool, error)
- func (s *TagService) SetValueByNameUnchecked(ctx context.Context, in *pb.TagNameValue) (*pb.MyBool, error)
- func (s *TagService) SetValueUnchecked(ctx context.Context, in *pb.TagValue) (*pb.MyBool, error)
- func (s *TagService) Update(ctx context.Context, in *pb.Tag) (*pb.Tag, error)
- func (s *TagService) View(ctx context.Context, in *pb.Id) (*pb.Tag, error)
- func (s *TagService) ViewByName(ctx context.Context, in *pb.Name) (*pb.Tag, error)
- func (s *TagService) ViewValue(ctx context.Context, in *pb.Id) (*pb.TagValueUpdated, error)
- func (s *TagService) ViewWithDeleted(ctx context.Context, in *pb.Id) (*pb.Tag, error)
- type TunnelService
- type UploadService
- type VarService
- func (s *VarService) Clone(ctx context.Context, in *edges.CloneVarRequest) (*pb.MyBool, error)
- func (s *VarService) Create(ctx context.Context, in *pb.Var) (*pb.Var, error)
- func (s *VarService) Delete(ctx context.Context, in *pb.Id) (*pb.MyBool, error)
- func (s *VarService) GetValue(ctx context.Context, in *pb.Id) (*pb.VarValue, error)
- func (s *VarService) GetValueByName(ctx context.Context, in *pb.Name) (*pb.VarNameValue, error)
- func (s *VarService) List(ctx context.Context, in *edges.ListVarRequest) (*edges.ListVarResponse, error)
- func (s *VarService) Pull(ctx context.Context, in *edges.PullVarRequest) (*edges.PullVarResponse, error)
- func (s *VarService) SetValue(ctx context.Context, in *pb.VarValue) (*pb.MyBool, error)
- func (s *VarService) SetValueByName(ctx context.Context, in *pb.VarNameValue) (*pb.MyBool, error)
- func (s *VarService) SetValueByNameUnchecked(ctx context.Context, in *pb.VarNameValue) (*pb.MyBool, error)
- func (s *VarService) SetValueUnchecked(ctx context.Context, in *pb.VarValue) (*pb.MyBool, error)
- func (s *VarService) Update(ctx context.Context, in *pb.Var) (*pb.Var, error)
- func (s *VarService) View(ctx context.Context, in *pb.Id) (*pb.Var, error)
- func (s *VarService) ViewByName(ctx context.Context, in *pb.Name) (*pb.Var, error)
- func (s *VarService) ViewWithDeleted(ctx context.Context, in *pb.Id) (*pb.Var, error)
- type WireService
- func (s *WireService) Clone(ctx context.Context, in *edges.CloneWireRequest) (*pb.MyBool, error)
- func (s *WireService) Create(ctx context.Context, in *pb.Wire) (*pb.Wire, error)
- func (s *WireService) Delete(ctx context.Context, in *pb.Id) (*pb.MyBool, error)
- func (s *WireService) DeleteValue(ctx context.Context, in *pb.Id) (*pb.MyBool, error)
- func (s *WireService) GetValue(ctx context.Context, in *pb.Id) (*pb.WireValue, error)
- func (s *WireService) GetValueByName(ctx context.Context, in *pb.Name) (*pb.WireNameValue, error)
- func (s *WireService) List(ctx context.Context, in *edges.ListWireRequest) (*edges.ListWireResponse, error)
- func (s *WireService) Pull(ctx context.Context, in *edges.PullWireRequest) (*edges.PullWireResponse, error)
- func (s *WireService) PullValue(ctx context.Context, in *edges.PullWireValueRequest) (*edges.PullWireValueResponse, error)
- func (s *WireService) SetValue(ctx context.Context, in *pb.WireValue) (*pb.MyBool, error)
- func (s *WireService) SetValueByName(ctx context.Context, in *pb.WireNameValue) (*pb.MyBool, error)
- func (s *WireService) SetValueByNameUnchecked(ctx context.Context, in *pb.WireNameValue) (*pb.MyBool, error)
- func (s *WireService) SetValueUnchecked(ctx context.Context, in *pb.WireValue) (*pb.MyBool, error)
- func (s *WireService) Start()
- func (s *WireService) Stop()
- func (s *WireService) Update(ctx context.Context, in *pb.Wire) (*pb.Wire, error)
- func (s *WireService) View(ctx context.Context, in *pb.Id) (*pb.Wire, error)
- func (s *WireService) ViewByName(ctx context.Context, in *pb.Name) (*pb.Wire, error)
- func (s *WireService) ViewValue(ctx context.Context, in *pb.Id) (*pb.WireValueUpdated, error)
- func (s *WireService) ViewWithDeleted(ctx context.Context, in *pb.Id) (*pb.Wire, error)
Constants ¶
View Source
const ( UPLOAD_PREFIX = "__" UPLOAD_SOURCE = "__src" UPLOAD_TIMESTAMP = "__ts" UPLOAD_DEFAULT_SOURCE = consts.DEFAULT_SOURCE )
Variables ¶
This section is empty.
Functions ¶
func CreateSchema ¶
Types ¶
type CableService ¶
type CableService struct { edges.UnimplementedCableServiceServer // contains filtered or unexported fields }
func (*CableService) Clone ¶
func (s *CableService) Clone(ctx context.Context, in *edges.CloneCableRequest) (*pb.MyBool, error)
func (*CableService) Link ¶
func (s *CableService) Link(ctx context.Context, in *edges.LinkCableRequest) (*pb.MyBool, error)
func (*CableService) List ¶
func (s *CableService) List(ctx context.Context, in *edges.ListCableRequest) (*edges.ListCableResponse, error)
func (*CableService) Pull ¶
func (s *CableService) Pull(ctx context.Context, in *edges.PullCableRequest) (*edges.PullCableResponse, error)
func (*CableService) ViewByName ¶
func (*CableService) ViewWithDeleted ¶
type ControlService ¶
type ControlService struct { edges.UnimplementedControlServiceServer // contains filtered or unexported fields }
func (*ControlService) AddSlotClient ¶
func (s *ControlService) AddSlotClient(slotID string, client slots.ControlServiceClient)
func (*ControlService) AddSourceServer ¶
func (s *ControlService) AddSourceServer(sourceID string, server slots.ControlServiceServer)
func (*ControlService) DeleteSlotClient ¶
func (s *ControlService) DeleteSlotClient(slotID string, client slots.ControlServiceClient)
func (*ControlService) GetSlotClient ¶
func (s *ControlService) GetSlotClient(slotID string) types.Option[slots.ControlServiceClient]
func (*ControlService) GetSourceServer ¶
func (s *ControlService) GetSourceServer(sourceID string) types.Option[slots.ControlServiceServer]
func (*ControlService) GetTagValue ¶
func (*ControlService) LinkSource ¶
func (s *ControlService) LinkSource(slotID string, sourceID string, status int32)
func (*ControlService) RemoveSourceServer ¶
func (s *ControlService) RemoveSourceServer(sourceID string, server slots.ControlServiceServer)
func (*ControlService) SetTagValue ¶
type DataService ¶
type DataService struct { edges.UnimplementedDataServiceServer // contains filtered or unexported fields }
func (*DataService) CacheTagValue ¶
func (s *DataService) CacheTagValue(tag *model.Tag, value nson.Value)
func (*DataService) Compile ¶
func (s *DataService) Compile(ctx context.Context, in *edges.DataQueryRequest) (*pb.Message, error)
func (*DataService) Query ¶
func (s *DataService) Query(in *edges.DataQueryRequest, stream edges.DataService_QueryServer) error
func (*DataService) QueryTag ¶
func (s *DataService) QueryTag(in *edges.DataQueryTagRequest, stream edges.DataService_QueryTagServer) error
func (*DataService) Upload ¶
func (s *DataService) Upload(ctx context.Context, in *edges.DataUploadRequest) (*edges.DataUploadResponse, error)
type DeviceService ¶
type DeviceService struct { edges.UnimplementedDeviceServiceServer // contains filtered or unexported fields }
type EdgeOption ¶
type EdgeOption interface {
// contains filtered or unexported methods
}
func WithDeviceID ¶
func WithDeviceID(id, secret string) EdgeOption
func WithInfluxDB ¶
func WithInfluxDB(influxdb *db.InfluxDB) EdgeOption
func WithLinkStatusTTL ¶
func WithLinkStatusTTL(d time.Duration) EdgeOption
func WithLogger ¶
func WithLogger(logger *zap.Logger) EdgeOption
func WithNode ¶
func WithNode(addr string, options []grpc.DialOption) EdgeOption
func WithQuic ¶
func WithQuic(addr string, tlsConfig *tls.Config, quicConfig *quic.Config) EdgeOption
func WithSyncLinkStatus ¶
func WithSyncLinkStatus(d time.Duration) EdgeOption
func WithSyncWireValueFromTagValue ¶
func WithSyncWireValueFromTagValue(d time.Duration) EdgeOption
func WithTokenRefresh ¶
func WithTokenRefresh(d time.Duration) EdgeOption
func WithValueCacheTTL ¶
func WithValueCacheTTL(d time.Duration) EdgeOption
type EdgeService ¶
type EdgeService struct {
// contains filtered or unexported fields
}
func Edge ¶
func Edge(db *bun.DB, opts ...EdgeOption) (*EdgeService, error)
func EdgeContext ¶
func EdgeContext(ctx context.Context, db *bun.DB, opts ...EdgeOption) (*EdgeService, error)
func (*EdgeService) Context ¶
func (es *EdgeService) Context() context.Context
func (*EdgeService) GetCable ¶
func (es *EdgeService) GetCable() *CableService
func (*EdgeService) GetControl ¶
func (es *EdgeService) GetControl() *ControlService
func (*EdgeService) GetDB ¶
func (es *EdgeService) GetDB() *bun.DB
func (*EdgeService) GetData ¶
func (es *EdgeService) GetData() *DataService
func (*EdgeService) GetDevice ¶
func (es *EdgeService) GetDevice() *DeviceService
func (*EdgeService) GetInfluxDB ¶
func (es *EdgeService) GetInfluxDB() types.Option[*db.InfluxDB]
func (*EdgeService) GetNode ¶
func (es *EdgeService) GetNode() *NodeService
func (*EdgeService) GetOption ¶
func (es *EdgeService) GetOption() *OptionService
func (*EdgeService) GetPort ¶
func (es *EdgeService) GetPort() *PortService
func (*EdgeService) GetProxy ¶
func (es *EdgeService) GetProxy() *ProxyService
func (*EdgeService) GetQuic ¶
func (es *EdgeService) GetQuic() types.Option[*QuicService]
func (*EdgeService) GetSlot ¶
func (es *EdgeService) GetSlot() *SlotService
func (*EdgeService) GetSource ¶
func (es *EdgeService) GetSource() *SourceService
func (*EdgeService) GetStatus ¶
func (es *EdgeService) GetStatus() *StatusService
func (*EdgeService) GetSync ¶
func (es *EdgeService) GetSync() *SyncService
func (*EdgeService) GetTag ¶
func (es *EdgeService) GetTag() *TagService
func (*EdgeService) GetVar ¶
func (es *EdgeService) GetVar() *VarService
func (*EdgeService) GetWire ¶
func (es *EdgeService) GetWire() *WireService
func (*EdgeService) Logger ¶
func (es *EdgeService) Logger() *zap.Logger
func (*EdgeService) Register ¶
func (es *EdgeService) Register(server *grpc.Server)
func (*EdgeService) Start ¶
func (es *EdgeService) Start()
func (*EdgeService) Stop ¶
func (es *EdgeService) Stop()
type NodeService ¶
type NodeService struct { NodeConn *grpc.ClientConn // contains filtered or unexported fields }
func (*NodeService) CableServiceClient ¶
func (s *NodeService) CableServiceClient() nodes.CableServiceClient
func (*NodeService) DataServiceClient ¶
func (s *NodeService) DataServiceClient() nodes.DataServiceClient
func (*NodeService) DeviceServiceClient ¶
func (s *NodeService) DeviceServiceClient() nodes.DeviceServiceClient
func (*NodeService) GetToken ¶
func (s *NodeService) GetToken() string
func (*NodeService) OptionServiceClient ¶
func (s *NodeService) OptionServiceClient() nodes.OptionServiceClient
func (*NodeService) PortServiceClient ¶
func (s *NodeService) PortServiceClient() nodes.PortServiceClient
func (*NodeService) ProxyServiceClient ¶
func (s *NodeService) ProxyServiceClient() nodes.ProxyServiceClient
func (*NodeService) RrpcServiceClient ¶
func (s *NodeService) RrpcServiceClient() rgrpc.RgrpcServiceClient
func (*NodeService) SlotServiceClient ¶
func (s *NodeService) SlotServiceClient() nodes.SlotServiceClient
func (*NodeService) SourceServiceClient ¶
func (s *NodeService) SourceServiceClient() nodes.SourceServiceClient
func (*NodeService) Start ¶
func (s *NodeService) Start()
func (*NodeService) Stop ¶
func (s *NodeService) Stop()
func (*NodeService) SyncServiceClient ¶
func (s *NodeService) SyncServiceClient() nodes.SyncServiceClient
func (*NodeService) TagServiceClient ¶
func (s *NodeService) TagServiceClient() nodes.TagServiceClient
func (*NodeService) VarServiceClient ¶
func (s *NodeService) VarServiceClient() nodes.VarServiceClient
func (*NodeService) WireServiceClient ¶
func (s *NodeService) WireServiceClient() nodes.WireServiceClient
type OptionService ¶
type OptionService struct { edges.UnimplementedOptionServiceServer // contains filtered or unexported fields }
func (*OptionService) Clone ¶
func (s *OptionService) Clone(ctx context.Context, in *edges.CloneOptionRequest) (*pb.MyBool, error)
func (*OptionService) List ¶
func (s *OptionService) List(ctx context.Context, in *edges.ListOptionRequest) (*edges.ListOptionResponse, error)
func (*OptionService) Pull ¶
func (s *OptionService) Pull(ctx context.Context, in *edges.PullOptionRequest) (*edges.PullOptionResponse, error)
func (*OptionService) Set ¶
func (s *OptionService) Set(ctx context.Context, name, value string) error
func (*OptionService) ViewByName ¶
func (*OptionService) ViewWithDeleted ¶
type PortService ¶
type PortService struct { edges.UnimplementedPortServiceServer // contains filtered or unexported fields }
func (*PortService) Clone ¶
func (s *PortService) Clone(ctx context.Context, in *edges.ClonePortRequest) (*pb.MyBool, error)
func (*PortService) Link ¶
func (s *PortService) Link(ctx context.Context, in *edges.LinkPortRequest) (*pb.MyBool, error)
func (*PortService) List ¶
func (s *PortService) List(ctx context.Context, in *edges.ListPortRequest) (*edges.ListPortResponse, error)
func (*PortService) Pull ¶
func (s *PortService) Pull(ctx context.Context, in *edges.PullPortRequest) (*edges.PullPortResponse, error)
func (*PortService) ViewByName ¶
func (*PortService) ViewWithDeleted ¶
type ProxyService ¶
type ProxyService struct { edges.UnimplementedProxyServiceServer // contains filtered or unexported fields }
func (*ProxyService) Clone ¶
func (s *ProxyService) Clone(ctx context.Context, in *edges.CloneProxyRequest) (*pb.MyBool, error)
func (*ProxyService) Link ¶
func (s *ProxyService) Link(ctx context.Context, in *edges.LinkProxyRequest) (*pb.MyBool, error)
func (*ProxyService) List ¶
func (s *ProxyService) List(ctx context.Context, in *edges.ListProxyRequest) (*edges.ListProxyResponse, error)
func (*ProxyService) Pull ¶
func (s *ProxyService) Pull(ctx context.Context, in *edges.PullProxyRequest) (*edges.PullProxyResponse, error)
func (*ProxyService) ViewByName ¶
func (*ProxyService) ViewWithDeleted ¶
type QuicService ¶
type QuicService struct {
// contains filtered or unexported fields
}
func (*QuicService) OpenStreamSync ¶
func (s *QuicService) OpenStreamSync() (quic.Stream, error)
func (*QuicService) Start ¶
func (s *QuicService) Start()
func (*QuicService) Stop ¶
func (s *QuicService) Stop()
type SlotService ¶
type SlotService struct { edges.UnimplementedSlotServiceServer // contains filtered or unexported fields }
func (*SlotService) Clone ¶
func (s *SlotService) Clone(ctx context.Context, in *edges.CloneSlotRequest) (*pb.MyBool, error)
func (*SlotService) Link ¶
func (s *SlotService) Link(ctx context.Context, in *edges.LinkSlotRequest) (*pb.MyBool, error)
func (*SlotService) List ¶
func (s *SlotService) List(ctx context.Context, in *edges.ListSlotRequest) (*edges.ListSlotResponse, error)
func (*SlotService) Pull ¶
func (s *SlotService) Pull(ctx context.Context, in *edges.PullSlotRequest) (*edges.PullSlotResponse, error)
func (*SlotService) ViewByName ¶
func (*SlotService) ViewWithDeleted ¶
type SourceService ¶
type SourceService struct { edges.UnimplementedSourceServiceServer // contains filtered or unexported fields }
func (*SourceService) Clone ¶
func (s *SourceService) Clone(ctx context.Context, in *edges.CloneSourceRequest) (*pb.MyBool, error)
func (*SourceService) Link ¶
func (s *SourceService) Link(ctx context.Context, in *edges.LinkSourceRequest) (*pb.MyBool, error)
func (*SourceService) List ¶
func (s *SourceService) List(ctx context.Context, in *edges.ListSourceRequest) (*edges.ListSourceResponse, error)
func (*SourceService) Pull ¶
func (s *SourceService) Pull(ctx context.Context, in *edges.PullSourceRequest) (*edges.PullSourceResponse, error)
func (*SourceService) ViewByName ¶
func (*SourceService) ViewWithDeleted ¶
type StatusService ¶
type StatusService struct {
// contains filtered or unexported fields
}
func (*StatusService) GetDeviceLink ¶
func (s *StatusService) GetDeviceLink() int32
func (*StatusService) GetDeviceLinkValue ¶
func (*StatusService) GetLink ¶
func (s *StatusService) GetLink(key string) int32
func (*StatusService) GetLinkValue ¶
func (*StatusService) SetDeviceLink ¶
func (s *StatusService) SetDeviceLink(status int32)
func (*StatusService) SetLink ¶
func (s *StatusService) SetLink(key string, status int32)
type SyncService ¶
type SyncService struct { edges.UnimplementedSyncServiceServer // contains filtered or unexported fields }
func (*SyncService) GetCableUpdated ¶
func (s *SyncService) GetCableUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
func (*SyncService) GetDeviceUpdated ¶
func (s *SyncService) GetDeviceUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
func (*SyncService) GetOptionUpdated ¶
func (s *SyncService) GetOptionUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
func (*SyncService) GetPortUpdated ¶
func (s *SyncService) GetPortUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
func (*SyncService) GetProxyUpdated ¶
func (s *SyncService) GetProxyUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
func (*SyncService) GetSlotUpdated ¶
func (s *SyncService) GetSlotUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
func (*SyncService) GetSourceUpdated ¶
func (s *SyncService) GetSourceUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
func (*SyncService) GetTagUpdated ¶
func (s *SyncService) GetTagUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
func (*SyncService) GetTagValueUpdated ¶
func (s *SyncService) GetTagValueUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
func (*SyncService) GetVarUpdated ¶
func (s *SyncService) GetVarUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
func (*SyncService) GetWireUpdated ¶
func (s *SyncService) GetWireUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
func (*SyncService) GetWireValueUpdated ¶
func (s *SyncService) GetWireValueUpdated(ctx context.Context, in *pb.MyEmpty) (*edges.SyncUpdated, error)
func (*SyncService) SetCableUpdated ¶
func (s *SyncService) SetCableUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
func (*SyncService) SetDeviceUpdated ¶
func (s *SyncService) SetDeviceUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
func (*SyncService) SetOptionUpdated ¶
func (s *SyncService) SetOptionUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
func (*SyncService) SetPortUpdated ¶
func (s *SyncService) SetPortUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
func (*SyncService) SetProxyUpdated ¶
func (s *SyncService) SetProxyUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
func (*SyncService) SetSlotUpdated ¶
func (s *SyncService) SetSlotUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
func (*SyncService) SetSourceUpdated ¶
func (s *SyncService) SetSourceUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
func (*SyncService) SetTagUpdated ¶
func (s *SyncService) SetTagUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
func (*SyncService) SetTagValueUpdated ¶
func (s *SyncService) SetTagValueUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
func (*SyncService) SetVarUpdated ¶
func (s *SyncService) SetVarUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
func (*SyncService) SetWireUpdated ¶
func (s *SyncService) SetWireUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
func (*SyncService) SetWireValueUpdated ¶
func (s *SyncService) SetWireValueUpdated(ctx context.Context, in *edges.SyncUpdated) (*pb.MyBool, error)
func (*SyncService) WaitDeviceUpdated ¶
func (s *SyncService) WaitDeviceUpdated(in *pb.MyEmpty, stream edges.SyncService_WaitDeviceUpdatedServer) error
func (*SyncService) WaitDeviceUpdated2 ¶
func (s *SyncService) WaitDeviceUpdated2(ctx context.Context) chan bool
func (*SyncService) WaitTagValueUpdated ¶
func (s *SyncService) WaitTagValueUpdated(in *pb.MyEmpty, stream edges.SyncService_WaitTagValueUpdatedServer) error
func (*SyncService) WaitTagValueUpdated2 ¶
func (s *SyncService) WaitTagValueUpdated2(ctx context.Context) chan bool
func (*SyncService) WaitWireValueUpdated ¶
func (s *SyncService) WaitWireValueUpdated(in *pb.MyEmpty, stream edges.SyncService_WaitWireValueUpdatedServer) error
func (*SyncService) WaitWireValueUpdated2 ¶
func (s *SyncService) WaitWireValueUpdated2(ctx context.Context) chan bool
type TagService ¶
type TagService struct { edges.UnimplementedTagServiceServer // contains filtered or unexported fields }
func (*TagService) Clone ¶
func (s *TagService) Clone(ctx context.Context, in *edges.CloneTagRequest) (*pb.MyBool, error)
func (*TagService) DeleteValue ¶
func (*TagService) GetTagValue ¶
func (s *TagService) GetTagValue(id string) nson.Value
func (*TagService) GetTagValueValue ¶
func (*TagService) GetValueByName ¶
func (s *TagService) GetValueByName(ctx context.Context, in *pb.Name) (*pb.TagNameValue, error)
func (*TagService) List ¶
func (s *TagService) List(ctx context.Context, in *edges.ListTagRequest) (*edges.ListTagResponse, error)
func (*TagService) Pull ¶
func (s *TagService) Pull(ctx context.Context, in *edges.PullTagRequest) (*edges.PullTagResponse, error)
func (*TagService) PullValue ¶
func (s *TagService) PullValue(ctx context.Context, in *edges.PullTagValueRequest) (*edges.PullTagValueResponse, error)
func (*TagService) SetTagValue ¶
func (s *TagService) SetTagValue(id string, value nson.Value)
func (*TagService) SetValueByName ¶
func (s *TagService) SetValueByName(ctx context.Context, in *pb.TagNameValue) (*pb.MyBool, error)
func (*TagService) SetValueByNameUnchecked ¶
func (s *TagService) SetValueByNameUnchecked(ctx context.Context, in *pb.TagNameValue) (*pb.MyBool, error)
func (*TagService) SetValueUnchecked ¶
func (*TagService) ViewByName ¶
func (*TagService) ViewValue ¶
func (s *TagService) ViewValue(ctx context.Context, in *pb.Id) (*pb.TagValueUpdated, error)
func (*TagService) ViewWithDeleted ¶
type TunnelService ¶
type TunnelService struct {
// contains filtered or unexported fields
}
func (*TunnelService) Start ¶
func (s *TunnelService) Start()
func (*TunnelService) Stop ¶
func (s *TunnelService) Stop()
type UploadService ¶
type UploadService struct {
// contains filtered or unexported fields
}
func NewUploadService ¶
func NewUploadService(es *EdgeService) (*UploadService, error)
func (*UploadService) Start ¶
func (s *UploadService) Start()
func (*UploadService) Stop ¶
func (s *UploadService) Stop()
type VarService ¶
type VarService struct { edges.UnimplementedVarServiceServer // contains filtered or unexported fields }
func (*VarService) Clone ¶
func (s *VarService) Clone(ctx context.Context, in *edges.CloneVarRequest) (*pb.MyBool, error)
func (*VarService) GetValueByName ¶
func (s *VarService) GetValueByName(ctx context.Context, in *pb.Name) (*pb.VarNameValue, error)
func (*VarService) List ¶
func (s *VarService) List(ctx context.Context, in *edges.ListVarRequest) (*edges.ListVarResponse, error)
func (*VarService) Pull ¶
func (s *VarService) Pull(ctx context.Context, in *edges.PullVarRequest) (*edges.PullVarResponse, error)
func (*VarService) SetValueByName ¶
func (s *VarService) SetValueByName(ctx context.Context, in *pb.VarNameValue) (*pb.MyBool, error)
func (*VarService) SetValueByNameUnchecked ¶
func (s *VarService) SetValueByNameUnchecked(ctx context.Context, in *pb.VarNameValue) (*pb.MyBool, error)
func (*VarService) SetValueUnchecked ¶
func (*VarService) ViewByName ¶
func (*VarService) ViewWithDeleted ¶
type WireService ¶
type WireService struct { edges.UnimplementedWireServiceServer // contains filtered or unexported fields }
func (*WireService) Clone ¶
func (s *WireService) Clone(ctx context.Context, in *edges.CloneWireRequest) (*pb.MyBool, error)
func (*WireService) DeleteValue ¶
func (*WireService) GetValueByName ¶
func (s *WireService) GetValueByName(ctx context.Context, in *pb.Name) (*pb.WireNameValue, error)
func (*WireService) List ¶
func (s *WireService) List(ctx context.Context, in *edges.ListWireRequest) (*edges.ListWireResponse, error)
func (*WireService) Pull ¶
func (s *WireService) Pull(ctx context.Context, in *edges.PullWireRequest) (*edges.PullWireResponse, error)
func (*WireService) PullValue ¶
func (s *WireService) PullValue(ctx context.Context, in *edges.PullWireValueRequest) (*edges.PullWireValueResponse, error)
func (*WireService) SetValueByName ¶
func (s *WireService) SetValueByName(ctx context.Context, in *pb.WireNameValue) (*pb.MyBool, error)
func (*WireService) SetValueByNameUnchecked ¶
func (s *WireService) SetValueByNameUnchecked(ctx context.Context, in *pb.WireNameValue) (*pb.MyBool, error)
func (*WireService) SetValueUnchecked ¶
func (*WireService) Start ¶
func (s *WireService) Start()
func (*WireService) Stop ¶
func (s *WireService) Stop()
func (*WireService) ViewByName ¶
func (*WireService) ViewValue ¶
func (s *WireService) ViewValue(ctx context.Context, in *pb.Id) (*pb.WireValueUpdated, error)
func (*WireService) ViewWithDeleted ¶
Click to show internal directories.
Click to hide internal directories.