Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix some spelling and typos #11

Merged
merged 1 commit into from
Jul 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions insonmnia/hub/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (h *Hub) List(context.Context, *pb.ListRequest) (*pb.ListReply, error) {
return &pb.ListReply{Info: info}, nil
}

// StartTask schedulles the Task on some miner
// StartTask schedules the Task on some miner
func (h *Hub) StartTask(ctx context.Context, request *pb.StartTaskRequest) (*pb.StartTaskReply, error) {
log.G(ctx).Info("handling StartTask request", zap.Any("req", request))
miner := request.Miner
Expand Down Expand Up @@ -154,7 +154,7 @@ func New(ctx context.Context) (*Hub, error) {
return h, nil
}

// Serve starts handling incoming API gRCP request and communicates
// Serve starts handling incoming API gRPC request and communicates
// with miners
func (h *Hub) Serve() error {
il, err := net.Listen("tcp", minerHubInterconnectEndpoint)
Expand All @@ -171,7 +171,7 @@ func (h *Hub) Serve() error {
il.Close()
return err
}
log.G(h.ctx).Info("listening for gRPC API conenctions", zap.Stringer("address", grpcL.Addr()))
log.G(h.ctx).Info("listening for gRPC API connections", zap.Stringer("address", grpcL.Addr()))
// TODO: fix this possible race: Close before Serve
h.minerListener = il

Expand Down
2 changes: 1 addition & 1 deletion insonmnia/miner/pull_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type spoolResponseProtocol struct {
Status string `json:"status"`
}

// decodeImagePull detects Error of an image pulling proces
// decodeImagePull detects Error of an image pulling process
// by decoding reply from Docker
// Although Docker should reply with JSON Encoded items
// one per line, in different versions it could vary.
Expand Down
10 changes: 5 additions & 5 deletions insonmnia/miner/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type Miner struct {
grpcServer *grpc.Server

hubaddress string
// NOTE: do not use static detetion
// NOTE: do not use static detection
pubaddress string

rl *reverseListener
Expand Down Expand Up @@ -138,7 +138,7 @@ func (m *Miner) connectToHub(address string) {
}
defer yaConn.Close()

// Push the connection to a pool for grcpServer
// Push the connection to a pool for grpcServer
if err = m.rl.enqueue(yaConn); err != nil {
log.G(m.ctx).Error("failed to enqueue yaConn for gRPC server", zap.Error(err))
return
Expand Down Expand Up @@ -174,12 +174,12 @@ func (m *Miner) connectToHub(address string) {
// Serve starts discovery of Hubs,
// accepts incoming connections from a Hub
func (m *Miner) Serve() error {
var grcpError error
var grpcError error
var wg sync.WaitGroup
wg.Add(1)
go func() {
defer wg.Done()
grcpError = m.grpcServer.Serve(m.rl)
grpcError = m.grpcServer.Serve(m.rl)
}()

wg.Add(1)
Expand All @@ -200,7 +200,7 @@ func (m *Miner) Serve() error {
}()
wg.Wait()

return grcpError
return grpcError
}

// Close disposes all resources related to the Miner
Expand Down
4 changes: 2 additions & 2 deletions insonmnia/muxproto/proto.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const (
UDP
)

// Control describes a channel in a multiplexed conenction
// Control describes a channel in a multiplexed connection
type Control struct {
Protocol ProtoType
Endpoint string
Expand All @@ -35,7 +35,7 @@ func (c Control) EncodeMsg(w *msgp.Writer) error {
return nil
}

// DecodeMsg satisfes msgp.Decodable
// DecodeMsg satisfies msgp.Decodable
func (c *Control) DecodeMsg(r *msgp.Reader) error {
proto, err := r.ReadInt()
if err != nil {
Expand Down