-
public interface FeatureScopeRepresents a Kubesense feature.
-
-
Method Summary
Modifier and Type Method Description abstract UnitwithWriteContext(Set<String> withFeatureContexts, Function2<KubesenseContext, Function1<Function1<EventBatchWriter, Unit>, Unit>, Unit> callback)Utility to write an event, asynchronously. abstract UnitwithContext(Set<String> withFeatureContexts, Function1<KubesenseContext, Unit> callback)Utility to read current KubesenseContext, asynchronously. abstract Pair<KubesenseContext, Function1<Function1<EventBatchWriter, Unit>, Unit>>getWriteContextSync(Set<String> withFeatureContexts)Same as withWriteContext but will be executed in the blocking manner. abstract UnitsendEvent(Object event)Send event to a given feature. abstract <T extends Feature> Tunwrap()Returns the original feature. abstract DataStoreHandlergetDataStore()Property to enable interaction with the data store. -
-
Method Detail
-
withWriteContext
@AnyThread() abstract Unit withWriteContext(Set<String> withFeatureContexts, Function2<KubesenseContext, Function1<Function1<EventBatchWriter, Unit>, Unit>, Unit> callback)
Utility to write an event, asynchronously.
- Parameters:
withFeatureContexts- Feature contexts (KubesenseContext.featuresContext property) to include in the KubesenseContext provided.callback- an operation called with an up-to-date KubesenseContext and an EventWriteScope.
-
withContext
@AnyThread() abstract Unit withContext(Set<String> withFeatureContexts, Function1<KubesenseContext, Unit> callback)
Utility to read current KubesenseContext, asynchronously.
- Parameters:
withFeatureContexts- Feature contexts (KubesenseContext.featuresContext property) to include in the KubesenseContext provided.callback- an operation called with an up-to-date KubesenseContext.
-
getWriteContextSync
@AnyThread() abstract Pair<KubesenseContext, Function1<Function1<EventBatchWriter, Unit>, Unit>> getWriteContextSync(Set<String> withFeatureContexts)
Same as withWriteContext but will be executed in the blocking manner.
- Parameters:
withFeatureContexts- Feature contexts (KubesenseContext.featuresContext property) to include in the KubesenseContext provided.
-
sendEvent
abstract Unit sendEvent(Object event)
Send event to a given feature. It will be sent in a synchronous way.
- Parameters:
event- Event to send.
-
getDataStore
abstract DataStoreHandler getDataStore()
Property to enable interaction with the data store.
-
-
-
-