Discover Packages
go.viam.com/utils
rpc
examples
fileupload
directory
Version:
v0.1.9
Opens a new window with list of versions in this module.
Published: Jan 17, 2023
License: Apache-2.0
Opens a new window with license information.
README
README
¶
Example gRPC File Upload Server
This example server demonstrates how to run a file upload server via gRPC accessible via grpc
, grpc-web
, grpc-gateway
, and grpc-over-webrtc
all on the same port while hosting other HTTP services. This is a browser only example but a go client could still be created like the echo example has.
Note: For the web, grpc-web
(Direct) will not work until https://github.com/grpc/grpc-web/issues/24 is done; WebRTC will work however.
Build
make build
Run
make run-server
With auth
make run-server-auth
With an external auth source
make run-server-auth-internal
# Use the UI on this one
make run-server-auth-external
Using
Go to http://localhost:8080 , upload a file, and check the terminal output.
Expand ▾
Collapse ▴
Directories
¶
Package server implement a file upload server.
Package server implement a file upload server.
cmd
Package main runs a gRPC server running the proto/rpc/examples/fileupload/v1 service.
Package main runs a gRPC server running the proto/rpc/examples/fileupload/v1 service.
Click to show internal directories.
Click to hide internal directories.