File tree 19 files changed +54
-21
lines changed
19 files changed +54
-21
lines changed Original file line number Diff line number Diff line change 1
1
run :
2
2
tests : true
3
- timeout : 10m
3
+ timeout : 20m
4
4
skip-dirs :
5
5
- pkg/gen
6
6
skip-files :
@@ -35,6 +35,10 @@ issues:
35
35
- revive
36
36
source : " . \" github.com/openservicemesh/osm/tests/framework\" "
37
37
text : " dot imports"
38
+ # Ignore error for package comments
39
+ - linters :
40
+ - revive
41
+ text : " package-comments: should have a package comment"
38
42
# Exclude staticcheck messages for deprecated function, variable or constant
39
43
# This causes issues with package github.com/golang/protobuf/proto
40
44
- linters :
Original file line number Diff line number Diff line change
1
+ // Package main implements the bookbuyer application
1
2
package main
2
3
3
4
import (
@@ -77,6 +78,7 @@ func debugServer() {
77
78
}
78
79
http .HandleFunc ("/favicon.ico" , func (w http.ResponseWriter , r * http.Request ) {})
79
80
log .Info ().Msgf ("Web server running on port %d" , * port )
81
+ //#nosec G114: Use of net/http serve function that has no support for setting timeouts
80
82
err = http .ListenAndServe (fmt .Sprintf (":%d" , * port ), router )
81
83
log .Fatal ().Err (err ).Msgf ("Failed to start HTTP server on port %d" , * port )
82
84
}
Original file line number Diff line number Diff line change
1
+ // Package main implements the bookstore application
1
2
package main
2
3
3
4
import (
@@ -164,8 +165,8 @@ func main() {
164
165
router .HandleFunc (h .path , h .fn ).Methods (h .method )
165
166
}
166
167
http .HandleFunc ("/favicon.ico" , func (w http.ResponseWriter , r * http.Request ) {})
167
-
168
168
log .Info ().Msgf ("Bookstore running on port %d" , * port )
169
+ //#nosec G114: Use of net/http serve function that has no support for setting timeouts
169
170
err = http .ListenAndServe (fmt .Sprintf (":%d" , * port ), router )
170
171
log .Fatal ().Err (err ).Msgf ("Failed to start HTTP server on port %d" , * port )
171
172
}
Original file line number Diff line number Diff line change
1
+ // Package main implements the bookthief application
1
2
package main
2
3
3
4
import (
@@ -86,6 +87,7 @@ func debugServer() {
86
87
}
87
88
http .HandleFunc ("/favicon.ico" , func (w http.ResponseWriter , r * http.Request ) {})
88
89
log .Info ().Msgf ("Bookthief running on port %d" , * port )
90
+ //#nosec G114: Use of net/http serve function that has no support for setting timeouts
89
91
err = http .ListenAndServe (fmt .Sprintf (":%d" , * port ), router )
90
92
log .Fatal ().Err (err ).Msgf ("Failed to start HTTP server on port %d" , * port )
91
93
}
Original file line number Diff line number Diff line change
1
+ // Package main implements the bookwarehouse application
2
+ // This create a service which has both inbound as well as outbound service policies
3
+ // i.e. bookbuyer makes a GET call to bookstore, bookstore makes a POST call to bookwarehouse
1
4
package main
2
5
3
6
import (
@@ -129,6 +132,7 @@ func main() {
129
132
router .HandleFunc ("/" , restockBooks ).Methods ("POST" )
130
133
http .HandleFunc ("/favicon.ico" , func (w http.ResponseWriter , r * http.Request ) {})
131
134
log .Info ().Msgf ("Starting BookWarehouse HTTP server on port %d" , * port )
135
+ //#nosec G114: Use of net/http serve function that has no support for setting timeouts
132
136
err := http .ListenAndServe (fmt .Sprintf (":%d" , * port ), router )
133
137
log .Fatal ().Err (err ).Msgf ("Failed to start BookWarehouse HTTP server on port %d" , * port )
134
138
}
Original file line number Diff line number Diff line change
1
+ // Package main implements the bookwatcher for terminal and JSON output from demo applications
1
2
package main
2
3
3
4
import (
Original file line number Diff line number Diff line change
1
+ // Package common implements shared functions and structs between various book* applications
1
2
package common
2
3
3
4
import (
Original file line number Diff line number Diff line change
1
+ // Package database allows the bookwarehouse service to store
2
+ // total books data into MySQL persistent storage
1
3
package database
2
4
3
5
import (
Original file line number Diff line number Diff line change
1
+ // Package mockspec allows the mocks to be generated consistently by doing the following:
2
+ // 1. defining mockgen rules using a file to specify the parameters
3
+ // 2. generating mocks the same way for each of the rules
4
+ // 3. integrating checks for the mocks in the CI
1
5
package main
2
6
3
7
import (
Original file line number Diff line number Diff line change
1
+ // Package auth implements the ExtAuthConfig struct.
1
2
package auth
2
3
3
4
import (
Original file line number Diff line number Diff line change
1
+ // Package k8s implements helper functions to get certificates from Kubernetes secret
1
2
package k8s
2
3
3
4
import (
Original file line number Diff line number Diff line change
1
+ // Package fake moves fakes to their own sub-package
1
2
package fake
2
3
3
4
import (
Original file line number Diff line number Diff line change
1
+ // Package secrets contains SDSCert types and methods
1
2
package secrets
2
3
3
4
import (
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // Package informers centralize informers by creating a single object that
2
+ // runs a set of informers, instead of creating different objects
3
+ // that each manage their own informer collections.
4
+ // A pointer to this object is then shared with all objects that need it.
1
5
package informers
2
6
3
7
import (
Original file line number Diff line number Diff line change
1
+ // Package models implements the HealthProbe struct.
1
2
package models
2
3
3
4
import "time"
Original file line number Diff line number Diff line change
1
+ // Package protobuf contains function(s) pertaining to protobufs
1
2
package protobuf
2
3
3
4
import (
Original file line number Diff line number Diff line change
1
+ // Package ticker reintroduces the ticker concept.
2
+ // It contains a ticker implementation that is fully interacted through pubsub.
3
+ // It starts turned off by default and is run after dispatcher starts.
1
4
package ticker
2
5
3
6
import (
Original file line number Diff line number Diff line change
1
+ // Package workerpool implements the thread-pool paradigm
2
+ // in Go. The benefits of it in Go however, can be quite different
3
+ // from any other language able to schedule itself on system threads.
4
+ //
5
+ // By using a workpool model, the main focus and intention is to limit the
6
+ // number of go routines that can do busy-work and get scheduled concurrenly
7
+ // at any point in time.
8
+ //
9
+ // Too many go routines being scheduled at the same time will cause other
10
+ // go routines (maybe more critical ones) to be scheduled less often, thus
11
+ // incurring in resource starvation on those and potentially triggering other
12
+ // issues.
13
+ //
14
+ // By being able to queue up work, we should be able to run a more deterministic
15
+ // runtime (despite Go's nature, this we will not be able to help), less dependant
16
+ // on the scheduler and more accurate in terms of time, as now the number of routines
17
+ // doing busy work can remain constant as opposed have O(N) routines attempting to run
18
+ // at the same time.
1
19
package workerpool
2
20
3
21
import (
You can’t perform that action at this time.
0 commit comments