Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHTTP ¶
func NewHTTP(requestHandler *RequestHandler) *router.Router
NewHTTP return router handle HTTP request
Types ¶
type Config ¶
type Config struct { grpc.Config ResourceDirectoryAddr string `envconfig:"RESOURCE_DIRECTORY_ADDRESS" default:"127.0.0.1:9100"` ResourceAggregateAddr string `envconfig:"RESOURCE_AGGREGATE_ADDRESS" default:"127.0.0.1:9100"` }
Config represent application configuration
type DeviceResources ¶
type DeviceResources struct {
Resources map[string]schema.ResourceLink `json:"resources"`
}
type DialCertManager ¶
type GetDevicesResponse ¶
type GetResourceLinksResponse ¶
type GetResourceLinksResponse struct {
Devices map[string]*DeviceResources `json:"devices"`
}
type ListenCertManager ¶
type RequestHandler ¶
type RequestHandler struct {
// contains filtered or unexported fields
}
RequestHandler for handling incoming request
func NewRequestHandler ¶
func NewRequestHandler(server *Server, raClient pbRA.ResourceAggregateClient, rdClient pbGRPC.GrpcGatewayClient) *RequestHandler
NewRequestHandler factory for new RequestHandler
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server handle HTTP request
func New ¶
func New(config Config, dialCertManager DialCertManager, listenCertManager ListenCertManager) *Server
New create new Server with provided stores
type State ¶
type State struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` IsOnline bool `protobuf:"varint,2,opt,name=is_online,json=isOnline,proto3" json:"is_online,omitempty"` IsConnected bool `protobuf:"varint,3,opt,name=is_connected,json=isConnected,proto3" json:"is_connected,omitempty"` }
Click to show internal directories.
Click to hide internal directories.