Documentation ¶
Index ¶
- Variables
- func New(ctx context.Context, config Config, fileWatcher *fsnotify.Watcher, ...) (*service.Service, error)
- func NewOperationProcessed(subscriptionId, correlationId string, ...) *pb.Event
- func Register(server *grpc.Server, handler *RequestHandler)
- type APIsConfig
- type ClientsConfig
- type Config
- type EventBusConfig
- type GRPCConfig
- type GrpcServerConfig
- type IdentityStoreConfig
- type RequestHandler
- func (r *RequestHandler) CancelPendingCommands(ctx context.Context, req *pb.CancelPendingCommandsRequest) (*pb.CancelPendingCommandsResponse, error)
- func (r *RequestHandler) CancelPendingMetadataUpdates(ctx context.Context, req *pb.CancelPendingMetadataUpdatesRequest) (*pb.CancelPendingCommandsResponse, error)
- func (r *RequestHandler) Close()
- func (r *RequestHandler) CreateResource(ctx context.Context, req *pb.CreateResourceRequest) (*pb.CreateResourceResponse, error)
- func (r *RequestHandler) DeleteDevices(ctx context.Context, req *pb.DeleteDevicesRequest) (*pb.DeleteDevicesResponse, error)
- func (r *RequestHandler) DeleteResource(ctx context.Context, req *pb.DeleteResourceRequest) (*pb.DeleteResourceResponse, error)
- func (r *RequestHandler) GetDevices(req *pb.GetDevicesRequest, srv pb.GrpcGateway_GetDevicesServer) error
- func (r *RequestHandler) GetDevicesMetadata(req *pb.GetDevicesMetadataRequest, srv pb.GrpcGateway_GetDevicesMetadataServer) error
- func (r *RequestHandler) GetEvents(req *pb.GetEventsRequest, srv pb.GrpcGateway_GetEventsServer) error
- func (r *RequestHandler) GetHubConfiguration(ctx context.Context, req *pb.HubConfigurationRequest) (*pb.HubConfigurationResponse, error)
- func (r *RequestHandler) GetPendingCommands(req *pb.GetPendingCommandsRequest, srv pb.GrpcGateway_GetPendingCommandsServer) error
- func (r *RequestHandler) GetResourceFromDevice(ctx context.Context, req *pb.GetResourceFromDeviceRequest) (*pb.GetResourceFromDeviceResponse, error)
- func (r *RequestHandler) GetResourceLinks(req *pb.GetResourceLinksRequest, srv pb.GrpcGateway_GetResourceLinksServer) error
- func (r *RequestHandler) GetResources(req *pb.GetResourcesRequest, srv pb.GrpcGateway_GetResourcesServer) error
- func (r *RequestHandler) SubscribeToEvents(srv pb.GrpcGateway_SubscribeToEventsServer) (errRet error)
- func (r *RequestHandler) UpdateDeviceMetadata(ctx context.Context, req *pb.UpdateDeviceMetadataRequest) (*pb.UpdateDeviceMetadataResponse, error)
- func (r *RequestHandler) UpdateResource(ctx context.Context, req *pb.UpdateResourceRequest) (*pb.UpdateResourceResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
func NewOperationProcessed ¶ added in v2.22.0
func Register ¶
func Register(server *grpc.Server, handler *RequestHandler)
Register registers the handler instance with a gRPC server.
Types ¶
type APIsConfig ¶
type APIsConfig struct {
GRPC GRPCConfig `yaml:"grpc" json:"grpc"`
}
Config represent application configuration
func (*APIsConfig) Validate ¶
func (c *APIsConfig) Validate() error
type ClientsConfig ¶
type ClientsConfig struct { IdentityStore IdentityStoreConfig `yaml:"identityStore" json:"identityStore"` Eventbus EventBusConfig `yaml:"eventBus" json:"eventBus"` ResourceAggregate GrpcServerConfig `yaml:"resourceAggregate" json:"resourceAggregate"` ResourceDirectory GrpcServerConfig `yaml:"resourceDirectory" json:"resourceDirectory"` CertificateAuthority GrpcServerConfig `yaml:"certificateAuthority" json:"certificateAuthority"` OpenTelemetryCollector otelClient.Config `yaml:"openTelemetryCollector" json:"openTelemetryCollector"` }
func (*ClientsConfig) Validate ¶
func (c *ClientsConfig) Validate() error
type Config ¶
type Config struct { Log log.Config `yaml:"log" json:"log"` APIs APIsConfig `yaml:"apis" json:"apis"` Clients ClientsConfig `yaml:"clients" json:"clients"` }
type EventBusConfig ¶
type EventBusConfig struct { GoPoolSize int `yaml:"goPoolSize" json:"goPoolSize"` NATS natsClient.ConfigSubscriber `yaml:"nats" json:"nats"` }
func (*EventBusConfig) Validate ¶
func (c *EventBusConfig) Validate() error
type GRPCConfig ¶
type GRPCConfig struct { OwnerCacheExpiration time.Duration `yaml:"ownerCacheExpiration" json:"ownerCacheExpiration"` SubscriptionBufferSize int `yaml:"subscriptionBufferSize" json:"subscriptionBufferSize"` server.Config `yaml:",inline" json:",inline"` }
func (*GRPCConfig) Validate ¶
func (c *GRPCConfig) Validate() error
type GrpcServerConfig ¶
func (*GrpcServerConfig) Validate ¶
func (c *GrpcServerConfig) Validate() error
type IdentityStoreConfig ¶
func (*IdentityStoreConfig) Validate ¶
func (c *IdentityStoreConfig) Validate() error
type RequestHandler ¶
type RequestHandler struct { pb.UnimplementedGrpcGatewayServer // contains filtered or unexported fields }
RequestHandler handles incoming requests.
func (*RequestHandler) CancelPendingCommands ¶
func (r *RequestHandler) CancelPendingCommands(ctx context.Context, req *pb.CancelPendingCommandsRequest) (*pb.CancelPendingCommandsResponse, error)
func (*RequestHandler) CancelPendingMetadataUpdates ¶
func (r *RequestHandler) CancelPendingMetadataUpdates(ctx context.Context, req *pb.CancelPendingMetadataUpdatesRequest) (*pb.CancelPendingCommandsResponse, error)
func (*RequestHandler) Close ¶
func (r *RequestHandler) Close()
func (*RequestHandler) CreateResource ¶
func (r *RequestHandler) CreateResource(ctx context.Context, req *pb.CreateResourceRequest) (*pb.CreateResourceResponse, error)
func (*RequestHandler) DeleteDevices ¶
func (r *RequestHandler) DeleteDevices(ctx context.Context, req *pb.DeleteDevicesRequest) (*pb.DeleteDevicesResponse, error)
func (*RequestHandler) DeleteResource ¶
func (r *RequestHandler) DeleteResource(ctx context.Context, req *pb.DeleteResourceRequest) (*pb.DeleteResourceResponse, error)
func (*RequestHandler) GetDevices ¶
func (r *RequestHandler) GetDevices(req *pb.GetDevicesRequest, srv pb.GrpcGateway_GetDevicesServer) error
func (*RequestHandler) GetDevicesMetadata ¶
func (r *RequestHandler) GetDevicesMetadata(req *pb.GetDevicesMetadataRequest, srv pb.GrpcGateway_GetDevicesMetadataServer) error
func (*RequestHandler) GetEvents ¶
func (r *RequestHandler) GetEvents(req *pb.GetEventsRequest, srv pb.GrpcGateway_GetEventsServer) error
func (*RequestHandler) GetHubConfiguration ¶
func (r *RequestHandler) GetHubConfiguration(ctx context.Context, req *pb.HubConfigurationRequest) (*pb.HubConfigurationResponse, error)
func (*RequestHandler) GetPendingCommands ¶
func (r *RequestHandler) GetPendingCommands(req *pb.GetPendingCommandsRequest, srv pb.GrpcGateway_GetPendingCommandsServer) error
func (*RequestHandler) GetResourceFromDevice ¶
func (r *RequestHandler) GetResourceFromDevice(ctx context.Context, req *pb.GetResourceFromDeviceRequest) (*pb.GetResourceFromDeviceResponse, error)
func (*RequestHandler) GetResourceLinks ¶
func (r *RequestHandler) GetResourceLinks(req *pb.GetResourceLinksRequest, srv pb.GrpcGateway_GetResourceLinksServer) error
func (*RequestHandler) GetResources ¶
func (r *RequestHandler) GetResources(req *pb.GetResourcesRequest, srv pb.GrpcGateway_GetResourcesServer) error
func (*RequestHandler) SubscribeToEvents ¶
func (r *RequestHandler) SubscribeToEvents(srv pb.GrpcGateway_SubscribeToEventsServer) (errRet error)
func (*RequestHandler) UpdateDeviceMetadata ¶
func (r *RequestHandler) UpdateDeviceMetadata(ctx context.Context, req *pb.UpdateDeviceMetadataRequest) (*pb.UpdateDeviceMetadataResponse, error)
func (*RequestHandler) UpdateResource ¶
func (r *RequestHandler) UpdateResource(ctx context.Context, req *pb.UpdateResourceRequest) (*pb.UpdateResourceResponse, error)
Source Files ¶
- cancelPendingCommands.go
- cancelPendingMetadataUpdates.go
- config.go
- createResource.go
- deleteDevices.go
- deleteResource.go
- getDevices.go
- getDevicesMetadata.go
- getEvents.go
- getHubConfiguration.go
- getPendingCommands.go
- getResourceFromDevice.go
- getResourceLinks.go
- getResources.go
- grpcApi.go
- service.go
- subscribeToEvents.go
- updateDeviceMetadata.go
- updateResource.go
Click to show internal directories.
Click to hide internal directories.