queueserver

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package queueserver implements a gRPC service run on a (cloud) server that relays Pub/Sub messages to IoT devices.

Index

Constants

View Source
const UserIDAttribute = "user-id"

UserIDAttribute is the name of the pub/sub message attribute with the user id.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	pb.UnimplementedCommandQueueServiceServer
	// contains filtered or unexported fields
}

func New

func New(aclsService *acls.Service, googleCloudProjectID, subscriptionName string) *Service

New creats a new Google pub/sub backed service.

func (*Service) ListTopics

func (s *Service) ListTopics(ctx context.Context, req *pb.ListTopicsRequest) (*pb.ListTopicsResponse, error)

func (*Service) Listen

Listens for events.

func (*Service) Run

func (s *Service) Run(ctx context.Context) error

Run listens to a pub sub topic until context is cancelled.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL