Documentation ¶
Overview ¶
Edge server client - edge server is a client of edge node subscribing images
Index ¶
- Variables
- type Authentication
- type EdgeNodeBroker
- func (s *EdgeNodeBroker) Connect(ctx context.Context, url *edgenode.Url) (*edgenode.Id, error)
- func (s *EdgeNodeBroker) LatencyCalc(ctx context.Context, lat *edgenode.LatencyMeasured) (*edgenode.Status, error)
- func (s *EdgeNodeBroker) Publish(stream edgenode.PubSub_PublishServer) error
- func (s *EdgeNodeBroker) StartEdgeNodeBroker(edgeServerIpaddr, login, password string) error
- func (s *EdgeNodeBroker) Subscribe(imPars *edgenode.ImageStreamParameters, stream edgenode.PubSub_SubscribeServer) error
- func (s *EdgeNodeBroker) UnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func (s *EdgeNodeBroker) Unsubscribe(ctx context.Context, caminfo *edgenode.CameraInfo) (*edgenode.Status, error)
- type EdgeNodeClient
- type EdgeServerBroker
- func (s *EdgeServerBroker) Connect(ctx context.Context, url *edgeserver.Url) (*edgeserver.Id, error)
- func (s *EdgeServerBroker) GetCameraInfo(ctx context.Context, campars *edgeserver.CameraParameters) (*edgeserver.CameraInfo, error)
- func (s *EdgeServerBroker) Register(ctx context.Context, nodeinfo *edgeserver.NodeInfo) (*edgeserver.Status, error)
- func (s *EdgeServerBroker) StartEdgeServerBroker()
- func (s *EdgeServerBroker) Subscribe(impars *edgeserver.ImageStreamParameters, ...) error
- func (s *EdgeServerBroker) UnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func (s *EdgeServerBroker) Unregister(ctx context.Context, nodeinfo *edgeserver.NodeInfo) (*edgeserver.Status, error)
- func (s *EdgeServerBroker) Unsubscribe(ctx context.Context, appinfo *edgeserver.AppInfo) (*edgeserver.Status, error)
- type EdgeServerClient
- type EdgeServerClientWithControl
Constants ¶
This section is empty.
Variables ¶
var ( ErrWrongNode = errors.New("Trying to subscribe to wrong edge node") ErrNotRegistered = errors.New("Edge node not registered") ErrRegistered = errors.New("Edge node already registered") ErrUnsubscribe = errors.New("Unsubscribe failed") ErrLoadCert = errors.New("Certificate loading error") ErrConnect = errors.New("Could not connect to server") )
var ActController = flag.String("c", "0", "a string")
to enable latency controller
var BrokerRestart = flag.String("r", "0", "a string")
to enable restart of brokers
var StorePath = flag.String("p", "../../def_store/", "a string")
to enable persistence
Functions ¶
This section is empty.
Types ¶
type Authentication ¶
type Authentication struct {
// contains filtered or unexported fields
}
Authentication holds the login/password
func (*Authentication) GetRequestMetadata ¶
GetRequestMetadata gets the current request metadata
func (*Authentication) RequireTransportSecurity ¶
func (a *Authentication) RequireTransportSecurity() bool
RequireTransportSecurity indicates whether the credentials requires transport security
type EdgeNodeBroker ¶
type EdgeNodeBroker struct {
// contains filtered or unexported fields
}
func NewEdgeNodeBroker ¶
func NewEdgeNodeBroker(sname, ipaddr, actController, storePath, brokerRestart string) *EdgeNodeBroker
func (*EdgeNodeBroker) Connect ¶
************ Begin RPCs ************* Connect API returns id assigned by Mez
func (*EdgeNodeBroker) LatencyCalc ¶
func (s *EdgeNodeBroker) LatencyCalc(ctx context.Context, lat *edgenode.LatencyMeasured) (*edgenode.Status, error)
func (*EdgeNodeBroker) Publish ¶
func (s *EdgeNodeBroker) Publish(stream edgenode.PubSub_PublishServer) error
Publish only supported by Edge node brokers
func (*EdgeNodeBroker) StartEdgeNodeBroker ¶
func (s *EdgeNodeBroker) StartEdgeNodeBroker(edgeServerIpaddr, login, password string) error
func (*EdgeNodeBroker) Subscribe ¶
func (s *EdgeNodeBroker) Subscribe(imPars *edgenode.ImageStreamParameters, stream edgenode.PubSub_SubscribeServer) error
Subscribe supported by both Edge server and Edge node brokers. However their implementation is different Edge node subscription interacts with the controller to produce a stream that satisfies the requested latency accuracy
func (*EdgeNodeBroker) UnaryInterceptor ¶
func (s *EdgeNodeBroker) UnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
unaryInterceptor calls authenticateClient with current context
func (*EdgeNodeBroker) Unsubscribe ¶
func (s *EdgeNodeBroker) Unsubscribe(ctx context.Context, caminfo *edgenode.CameraInfo) (*edgenode.Status, error)
type EdgeNodeClient ¶
type EdgeNodeClient struct {
Auth Authentication
}
func NewEdgeNodeClient ¶
func NewEdgeNodeClient(login, password string) *EdgeNodeClient
func (*EdgeNodeClient) Register ¶
func (cc *EdgeNodeClient) Register(ipaddr string, camid string, client edgeserver.PubSubClient) error
type EdgeServerBroker ¶
type EdgeServerBroker struct {
// contains filtered or unexported fields
}
func NewEdgeServerBroker ¶
func NewEdgeServerBroker(sname, ipaddr, actController, storePath, brokerRestart string) *EdgeServerBroker
func (*EdgeServerBroker) Connect ¶
func (s *EdgeServerBroker) Connect(ctx context.Context, url *edgeserver.Url) (*edgeserver.Id, error)
************ Begin RPCs ************* Connect API returns id assigned by Mez
func (*EdgeServerBroker) GetCameraInfo ¶
func (s *EdgeServerBroker) GetCameraInfo(ctx context.Context, campars *edgeserver.CameraParameters) (*edgeserver.CameraInfo, error)
Called by consumer application
func (*EdgeServerBroker) Register ¶
func (s *EdgeServerBroker) Register(ctx context.Context, nodeinfo *edgeserver.NodeInfo) (*edgeserver.Status, error)
Called by Edge node
func (*EdgeServerBroker) StartEdgeServerBroker ¶
func (s *EdgeServerBroker) StartEdgeServerBroker()
func (*EdgeServerBroker) Subscribe ¶
func (s *EdgeServerBroker) Subscribe(impars *edgeserver.ImageStreamParameters, stream edgeserver.PubSub_SubscribeServer) error
Called by consumer application
func (*EdgeServerBroker) UnaryInterceptor ¶
func (s *EdgeServerBroker) UnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
unaryInterceptor calls authenticateClient with current context
func (*EdgeServerBroker) Unregister ¶
func (s *EdgeServerBroker) Unregister(ctx context.Context, nodeinfo *edgeserver.NodeInfo) (*edgeserver.Status, error)
Called by Edge node
func (*EdgeServerBroker) Unsubscribe ¶
func (s *EdgeServerBroker) Unsubscribe(ctx context.Context, appinfo *edgeserver.AppInfo) (*edgeserver.Status, error)
type EdgeServerClient ¶
type EdgeServerClient struct {
Auth Authentication
}
func NewEdgeServerClient ¶
func NewEdgeServerClient(login, password string) *EdgeServerClient
func (*EdgeServerClient) SubscribeImage ¶
func (cc *EdgeServerClient) SubscribeImage(s *EdgeServerBroker, client edgenode.PubSubClient, impars *edgeserver.ImageStreamParameters, c chan<- bool) error
type EdgeServerClientWithControl ¶
type EdgeServerClientWithControl struct { Auth Authentication // contains filtered or unexported fields }
func NewEdgeServerClientWithControl ¶
func NewEdgeServerClientWithControl(login, password string) *EdgeServerClientWithControl
func (*EdgeServerClientWithControl) SubscribeImage ¶
func (cc *EdgeServerClientWithControl) SubscribeImage(s *EdgeServerBroker, client edgenode.PubSubClient, impars *edgeserver.ImageStreamParameters, c chan<- bool) error