Skip to content

Commit 16c1b44

Browse files
committed
cleanup
1 parent fdc5486 commit 16c1b44

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

caddy/mercure.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ func init() { //nolint:gochecknoinits
3939
httpcaddyfile.RegisterDirectiveOrder("mercure", "after", "encode")
4040
}
4141

42-
type JWTConfig struct {
42+
type jwtConfig struct {
4343
Key string `json:"key,omitempty"`
4444
Alg string `json:"alg,omitempty"`
4545
}
4646

47-
type TopicSelectorCacheConfig struct {
47+
type topicSelectorCacheConfig struct {
4848
MaxEntriesPerShard uint `json:"max_entries_per_shard,omitempty"`
4949
ShardCount uint `json:"shard_count,omitempty"`
5050
}
@@ -73,13 +73,13 @@ type Mercure struct {
7373
Heartbeat *caddy.Duration `json:"heartbeat,omitempty"`
7474

7575
// JWT key and signing algorithm to use for publishers.
76-
PublisherJWT JWTConfig `json:"publisher_jwt,omitempty"`
76+
PublisherJWT jwtConfig `json:"publisher_jwt,omitempty"`
7777

7878
// JWK Set URL to use for publishers.
7979
PublisherJWKSURL string `json:"publisher_jwks_url,omitempty"`
8080

8181
// JWT key and signing algorithm to use for subscribers.
82-
SubscriberJWT JWTConfig `json:"subscriber_jwt,omitempty"`
82+
SubscriberJWT jwtConfig `json:"subscriber_jwt,omitempty"`
8383

8484
// JWK Set URL to use for subscribers.
8585
SubscriberJWKSURL string `json:"subscriber_jwks_url,omitempty"`
@@ -99,7 +99,7 @@ type Mercure struct {
9999
LRUShardSize *int64 `json:"lru_shard_size,omitempty"`
100100

101101
// Triggers use of LRU topic selector cache and avoidance of select priority queue.
102-
TopicSelectorCache *TopicSelectorCacheConfig `json:"cache,omitempty"`
102+
TopicSelectorCache *topicSelectorCacheConfig `json:"cache,omitempty"`
103103

104104
// The name of the authorization cookie. Defaults to "mercureAuthorization".
105105
CookieName string `json:"cookie_name,omitempty"`
@@ -482,7 +482,7 @@ func (m *Mercure) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { //nolint:fu
482482
return err
483483
}
484484

485-
m.TopicSelectorCache = &TopicSelectorCacheConfig{uint(maxEntriesPerShard), uint(shardCount)}
485+
m.TopicSelectorCache = &topicSelectorCacheConfig{uint(maxEntriesPerShard), uint(shardCount)}
486486
case "cookie_name":
487487
if !d.NextArg() {
488488
return d.ArgErr()

0 commit comments

Comments
 (0)