Skip to content

Commit

Permalink
Added ops instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
oxtoacart committed May 18, 2023
1 parent fd9a1fb commit a7a17ed
Show file tree
Hide file tree
Showing 7 changed files with 1,099 additions and 1,042 deletions.
9 changes: 5 additions & 4 deletions context.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import (
"net/http"
"time"

"github.com/getlantern/eventual"
tls "github.com/refraction-networking/utls"

"github.com/getlantern/eventual"
)

var (
Expand Down Expand Up @@ -61,8 +62,8 @@ func (fctx *FrontingContext) Configure(pool *x509.CertPool, providers map[string
func (fctx *FrontingContext) ConfigureWithHello(pool *x509.CertPool, providers map[string]*Provider, defaultProviderID string, cacheFile string, clientHelloID tls.ClientHelloID) error {
log.Tracef("Configuring fronted %s context", fctx.name)

if providers == nil || len(providers) == 0 {
return fmt.Errorf("No fronted providers for %s context.", fctx.name)
if len(providers) == 0 {
return fmt.Errorf("no fronted providers for %s context", fctx.name)
}

_existing, ok := fctx.instance.Get(0)
Expand All @@ -78,7 +79,7 @@ func (fctx *FrontingContext) ConfigureWithHello(pool *x509.CertPool, providers m
}

if size == 0 {
return fmt.Errorf("No masquerades for %s context.", fctx.name)
return fmt.Errorf("no masquerades for %s context", fctx.name)
}

d := &direct{
Expand Down
Loading

0 comments on commit a7a17ed

Please sign in to comment.