Skip to content

Commit

Permalink
add doc string
Browse files Browse the repository at this point in the history
  • Loading branch information
ajatprabha committed May 18, 2021
1 parent f1b7a32 commit 76636d5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
1 change: 1 addition & 0 deletions component/grpc_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"google.golang.org/grpc"
)

// GRPCServerOptions holds options for GRPCServer
type GRPCServerOptions struct {
Server *grpc.Server
Listener net.Listener
Expand Down
12 changes: 1 addition & 11 deletions component/grpc_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (s *GRPCServerSuite) TestGRPCServer() {
}

s.NoError(m.Add(GRPCServer(GRPCServerOptions{
Server: srv,
Server: srv,
Listener: l,
PreStart: func() {
s.T().Log("PreStart called")
Expand Down Expand Up @@ -119,13 +119,3 @@ func (m *mockListener) Close() error {
func (m *mockListener) Addr() net.Addr {
return m.Called().Get(0).(net.Addr)
}

type badAddr struct{}

func (b badAddr) Network() string {
return "tcp"
}

func (b badAddr) String() string {
return "bad address"
}
1 change: 1 addition & 0 deletions component/http_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/gojekfarm/xrun"
)

// HTTPServerOptions holds options for HTTPServer
type HTTPServerOptions struct {
Server *http.Server
PreStart func()
Expand Down

0 comments on commit 76636d5

Please sign in to comment.