Skip to content

Sample grpc server and client, connected via unix socket, socket deletion watcher

Notifications You must be signed in to change notification settings

keliramu/watch-socket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

Sample grpc server and client.

Communication transport: unix domain socket.

The goal of this sample is to implement monitoring of socket file deletion and if socket file is deleted - restart grpc server and recreate socket file.

Build

go build -o srv ./server/main.go
go build -o clnt ./client/main.go

Run

In separate terminal run server:

./srv

In separate terminal run client:

./clnt

Try to remove socket file rm /tmp/echo.sock and then run client again - server should be restarted and communicating and socket file present again.

Links

Used code samples from:

https://grpc.io/docs/languages/go/quickstart/

https://github.com/jianfengye/go-superviser

About

Sample grpc server and client, connected via unix socket, socket deletion watcher

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published