Documentation
¶
Overview ¶
Copyright © 2021-2023 Infinite Devices GmbH
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021-2023 Infinite Devices GmbH Nikita Ivanovski info@slnt-opp.xyz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Variables
- func Key(device string, key pb.StateKey) string
- func MergeJSON(old, new []byte) ([]byte, error)
- func NewRedisSequencer(rdb redis.Cmdable) sequencer
- func ValidateState(st *pb.State) error
- type ReadRecorder
- type ShadowServiceServer
- func (s *ShadowServiceServer) Accept(sh *pb.Shadow)
- func (s *ShadowServiceServer) Dispatch(sh *pb.Shadow, pub func())
- func (s *ShadowServiceServer) Get(ctx context.Context, req *pb.GetRequest) (*pb.GetResponse, error)
- func (s *ShadowServiceServer) MergeAndStore(log *zap.Logger, device string, skey pb.StateKey, state *pb.State)
- func (s *ShadowServiceServer) Patch(ctx context.Context, req *pb.Shadow) (*pb.Shadow, error)
- func (s *ShadowServiceServer) PatchMany(ctx context.Context, req *pb.PatchManyRequest) (*pb.PatchManyResponse, error)
- func (s *ShadowServiceServer) Persister()
- func (s *ShadowServiceServer) PublishDeviceScope(ctx context.Context, ev *pb.Shadow) (*emptypb.Empty, error)
- func (s *ShadowServiceServer) Remove(ctx context.Context, req *pb.RemoveRequest) (*pb.Shadow, error)
- func (s *ShadowServiceServer) SetReadRecorder(r ReadRecorder)
- func (s *ShadowServiceServer) SetSequencer(ids sequencer)
- func (s *ShadowServiceServer) Store(log *zap.Logger, device string, skey pb.StateKey, state interface{}) (string, bool)
- func (s *ShadowServiceServer) StoreConnectionState(log *zap.Logger, device string, state *pb.ConnectionState)
- func (s *ShadowServiceServer) StreamShadow(req *pb.StreamShadowRequest, srv pb.ShadowService_StreamShadowServer) error
Constants ¶
This section is empty.
Variables ¶
var Dispatch func(*pb.Shadow, func())
Dispatch stamps a shadow and publishes it without letting a later sequence go out first. The shadow command sets it to the running server.
var Inbound func(*pb.Shadow)
Inbound stamps a shadow when it enters this process from RabbitMQ. The shadow command sets it to the running server.
Functions ¶
func NewRedisSequencer ¶
func ValidateState ¶
Types ¶
type ReadRecorder ¶
type ShadowServiceServer ¶
type ShadowServiceServer struct {
pb.UnimplementedShadowServiceServer
// contains filtered or unexported fields
}
func NewShadowServiceServer ¶
func (*ShadowServiceServer) Accept ¶
func (s *ShadowServiceServer) Accept(sh *pb.Shadow)
func (*ShadowServiceServer) Dispatch ¶
func (s *ShadowServiceServer) Dispatch(sh *pb.Shadow, pub func())
func (*ShadowServiceServer) Get ¶
func (s *ShadowServiceServer) Get(ctx context.Context, req *pb.GetRequest) (*pb.GetResponse, error)
func (*ShadowServiceServer) MergeAndStore ¶
func (*ShadowServiceServer) PatchMany ¶
func (s *ShadowServiceServer) PatchMany(ctx context.Context, req *pb.PatchManyRequest) (*pb.PatchManyResponse, error)
func (*ShadowServiceServer) Persister ¶
func (s *ShadowServiceServer) Persister()
func (*ShadowServiceServer) PublishDeviceScope ¶
func (*ShadowServiceServer) Remove ¶
func (s *ShadowServiceServer) Remove(ctx context.Context, req *pb.RemoveRequest) (*pb.Shadow, error)
func (*ShadowServiceServer) SetReadRecorder ¶
func (s *ShadowServiceServer) SetReadRecorder(r ReadRecorder)
func (*ShadowServiceServer) SetSequencer ¶
func (s *ShadowServiceServer) SetSequencer(ids sequencer)
func (*ShadowServiceServer) StoreConnectionState ¶
func (s *ShadowServiceServer) StoreConnectionState(log *zap.Logger, device string, state *pb.ConnectionState)
func (*ShadowServiceServer) StreamShadow ¶
func (s *ShadowServiceServer) StreamShadow(req *pb.StreamShadowRequest, srv pb.ShadowService_StreamShadowServer) error