WithServices registers the given services on the "self" peer.
(services ...interface{ Roles() []ttnpb.ClusterRole })
| 99 | |
| 100 | // WithServices registers the given services on the "self" peer. |
| 101 | func 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. |
| 112 | func WithTLSConfig(tlsConfig *tls.Config) Option { |
no test coverage detected