Skip to content

Commit

Permalink
Expose configuration of interceptors via LedgerFactory (digital-asset…
Browse files Browse the repository at this point in the history
  • Loading branch information
miklos-da authored Jun 4, 2020
1 parent 8e3e296 commit 60b46bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import com.daml.platform.configuration.{
}
import com.daml.platform.indexer.{IndexerConfig, IndexerStartupMode}
import com.daml.resources.ResourceOwner
import io.grpc.ServerInterceptor
import scopt.OptionParser

trait ConfigProvider[ExtraConfig] {
Expand Down Expand Up @@ -78,6 +79,9 @@ trait ConfigProvider[ExtraConfig] {
def authService(config: Config[ExtraConfig]): AuthService =
AuthServiceWildcard

def interceptors(config: Config[ExtraConfig]): List[ServerInterceptor] =
List.empty

def createMetrics(
participantConfig: ParticipantConfig,
config: Config[ExtraConfig],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ final class Runner[T <: ReadWriteService, Extra](
transformIndexService = service => new TimedIndexService(service, metrics),
metrics = metrics,
timeServiceBackend = factory.timeServiceBackend(config),
otherInterceptors = factory.interceptors(config),
engine = sharedEngine,
lfValueTranslationCache = lfValueTranslationCache,
).acquire()
Expand Down

0 comments on commit 60b46bb

Please sign in to comment.