MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / WithServices

Function WithServices

pkg/cluster/cluster.go:101–109  ·  view source on GitHub ↗

WithServices registers the given services on the "self" peer.

(services ...interface{ Roles() []ttnpb.ClusterRole })

Source from the content-addressed store, hash-verified

99
100// WithServices registers the given services on the "self" peer.
101func WithServices(services ...interface{ Roles() []ttnpb.ClusterRole }) Option {
102 return optionFunc(func(c *cluster) {
103 for _, service := range services {
104 if roles := service.Roles(); len(roles) > 0 {
105 c.self.roles = append(c.self.roles, roles...)
106 }
107 }
108 })
109}
110
111// WithTLSConfig sets the TLS config to use in cluster connections.
112func WithTLSConfig(tlsConfig *tls.Config) Option {

Callers 1

initClusterMethod · 0.92

Calls 2

optionFuncFuncType · 0.70
RolesMethod · 0.65

Tested by

no test coverage detected