com.bybutter.sisyphus.starter.grpc.transcoding.TranscodingAttributeInterceptor.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sisyphus-grpc-transcoding-starter Show documentation
Show all versions of sisyphus-grpc-transcoding-starter Show documentation
Starter for building gRPC server which with HTTP and gRPC Transcoding in Sisyphus Framework
The newest version!
package com.bybutter.sisyphus.starter.grpc.transcoding
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component
import org.springframework.web.server.ServerWebExchange
import org.springframework.web.server.WebFilter
import org.springframework.web.server.WebFilterChain
import reactor.core.publisher.Mono
@Component
class TranscodingAttributeInterceptor : WebFilter {
@Autowired(required = false)
private val headerExporters: List = listOf()
override fun filter(
exchange: ServerWebExchange,
chain: WebFilterChain,
): Mono {
exchange.attributes[TranscodingFunctions.HEADER_EXPORTER_ATTRIBUTE] = headerExporters
return chain.filter(exchange)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy