Search in sources :

Example 1 with StaticHttpServiceSelector

use of io.airlift.discovery.client.testing.StaticHttpServiceSelector in project airlift by airlift.

the class TestHttpEventClient method newEventClient.

private HttpEventClient newEventClient(List<URI> uris) {
    HttpServiceSelector selector = new StaticHttpServiceSelector("collector", "general", uris);
    Set<EventTypeMetadata<?>> eventTypes = getValidEventTypeMetaDataSet(FixedDummyEventClass.class);
    JsonEventWriter eventWriter = new JsonEventWriter(eventTypes);
    return new HttpEventClient(selector, eventWriter, new NodeInfo("test"), httpClient);
}
Also used : NodeInfo(io.airlift.node.NodeInfo) StaticHttpServiceSelector(io.airlift.discovery.client.testing.StaticHttpServiceSelector) StaticHttpServiceSelector(io.airlift.discovery.client.testing.StaticHttpServiceSelector) HttpServiceSelector(io.airlift.discovery.client.HttpServiceSelector)

Example 2 with StaticHttpServiceSelector

use of io.airlift.discovery.client.testing.StaticHttpServiceSelector in project airlift by airlift.

the class TestHttpEventClient method newEventClient.

private HttpEventClient newEventClient(List<URI> uris) {
    HttpServiceSelector selector = new StaticHttpServiceSelector("collector", "general", uris);
    Set<EventTypeMetadata<?>> eventTypes = getValidEventTypeMetaDataSet(FixedDummyEventClass.class);
    JsonEventWriter eventWriter = new JsonEventWriter(eventTypes);
    return new HttpEventClient(selector, eventWriter, new NodeInfo("test"), httpClient);
}
Also used : NodeInfo(io.airlift.node.NodeInfo) JsonEventWriter(io.airlift.event.client.JsonEventWriter) StaticHttpServiceSelector(io.airlift.discovery.client.testing.StaticHttpServiceSelector) StaticHttpServiceSelector(io.airlift.discovery.client.testing.StaticHttpServiceSelector) HttpServiceSelector(io.airlift.discovery.client.HttpServiceSelector) EventTypeMetadata(io.airlift.event.client.EventTypeMetadata)

Aggregations

HttpServiceSelector (io.airlift.discovery.client.HttpServiceSelector)2 StaticHttpServiceSelector (io.airlift.discovery.client.testing.StaticHttpServiceSelector)2 NodeInfo (io.airlift.node.NodeInfo)2 EventTypeMetadata (io.airlift.event.client.EventTypeMetadata)1 JsonEventWriter (io.airlift.event.client.JsonEventWriter)1