Skip to content

Commit

Permalink
osx build
Browse files Browse the repository at this point in the history
  • Loading branch information
aleks-f committed Dec 20, 2016
1 parent 8dce069 commit cdcb49e
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 22 deletions.
4 changes: 2 additions & 2 deletions userspace/libsinsp/k8s_api_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ k8s_api_handler::k8s_api_handler(collector_ptr_t collector,
k8s_handler("k8s_api_handler", false,
#ifdef HAS_CAPTURE
url, path, filter, ".", collector, http_version, 1000L, ssl, bt,
false, true, std::make_shared<k8s_dummy_handler>(), blocking_socket, ~0,
false, true, std::make_shared<k8s_dummy_handler>(), blocking_socket,
#endif // HAS_CAPTURE
nullptr)
~0, nullptr)
{
}

Expand Down
2 changes: 1 addition & 1 deletion userspace/libsinsp/k8s_daemonset_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ k8s_daemonset_handler::k8s_daemonset_handler(k8s_state_t& state
STATE_FILTER, EVENT_FILTER, collector,
http_version, 1000L, ssl, bt, true,
connect, dependency_handler, blocking_socket,
100, // max msgs
#endif // HAS_CAPTURE
100, // max msgs
&state)
{
}
Expand Down
2 changes: 1 addition & 1 deletion userspace/libsinsp/k8s_deployment_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ k8s_deployment_handler::k8s_deployment_handler(k8s_state_t& state
STATE_FILTER, EVENT_FILTER, collector,
http_version, 1000L, ssl, bt, true,
connect, dependency_handler, blocking_socket,
100, // max msgs
#endif // HAS_CAPTURE
100, // max msgs
&state)
{
}
Expand Down
4 changes: 2 additions & 2 deletions userspace/libsinsp/k8s_event_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ k8s_event_handler::k8s_event_handler(k8s_state_t& state
url, "/api/v1/events",
STATE_FILTER, EVENT_FILTER, collector,
http_version, 1000L, ssl, bt, true,
connect, dependency_handler, blocking_socket, ~0,
connect, dependency_handler, blocking_socket,
#endif // HAS_CAPTURE
&state),
~0, &state),
m_event_filter(event_filter)
{
}
Expand Down
4 changes: 2 additions & 2 deletions userspace/libsinsp/k8s_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ k8s_handler::k8s_handler(const std::string& id,
bool connect,
ptr_t dependency_handler,
bool blocking_socket,
unsigned max_messages,
#endif // HAS_CAPTURE
unsigned max_messages,
k8s_state_t* state): m_state(state),
m_id(id + "_state"),
#ifdef HAS_CAPTURE
Expand All @@ -62,8 +62,8 @@ k8s_handler::k8s_handler(const std::string& id,
m_connect(connect),
m_dependency_handler(dependency_handler),
m_blocking_socket(blocking_socket),
m_max_messages(max_messages),
#endif // HAS_CAPTURE
m_max_messages(max_messages),
m_is_captured(is_captured)
{
#ifdef HAS_CAPTURE
Expand Down
11 changes: 6 additions & 5 deletions userspace/libsinsp/k8s_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class k8s_handler
bool connect = true,
ptr_t dependency_handler = nullptr,
bool blocking_socket = false,
unsigned max_messages = ~0,
#endif // HAS_CAPTURE
unsigned max_messages = ~0,
k8s_state_t* state = nullptr);

virtual ~k8s_handler();
Expand Down Expand Up @@ -169,10 +169,11 @@ class k8s_handler

bool m_blocking_socket = false;

#endif // HAS_CAPTURE

// limits the number of messages handled in single cycle
unsigned m_max_messages = ~0;
bool m_state_processing_started = false;
#endif // HAS_CAPTURE

event_list_t m_events;

Expand All @@ -196,7 +197,6 @@ class k8s_handler
bool m_connect_logged = false;
};

#ifdef HAS_CAPTURE
inline unsigned k8s_handler::get_max_messages() const
{
return m_max_messages;
Expand All @@ -207,6 +207,7 @@ inline void k8s_handler::set_max_messages(unsigned max_msgs)
m_max_messages = max_msgs;
}

#ifdef HAS_CAPTURE
inline k8s_handler::handler_ptr_t k8s_handler::handler()
{
return m_handler;
Expand Down Expand Up @@ -280,9 +281,9 @@ class k8s_dummy_handler : public k8s_handler
#ifdef HAS_CAPTURE
"", "", "", "", nullptr,
"", 0, nullptr, nullptr,
false, false, nullptr, false, ~0,
false, false, nullptr, false,
#endif // HAS_CAPTURE
nullptr)
~0, nullptr)
{
m_state_built = true;
}
Expand Down
4 changes: 2 additions & 2 deletions userspace/libsinsp/k8s_namespace_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ k8s_namespace_handler::k8s_namespace_handler(k8s_state_t& state
url, "/api/v1/namespaces",
STATE_FILTER, EVENT_FILTER, collector,
http_version, 1000L, ssl, bt, true,
connect, dependency_handler, blocking_socket, ~0,
connect, dependency_handler, blocking_socket,
#endif // HAS_CAPTURE
&state)
~0, &state)
{
}

Expand Down
4 changes: 2 additions & 2 deletions userspace/libsinsp/k8s_node_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ k8s_node_handler::k8s_node_handler(k8s_state_t& state
url, "/api/v1/nodes",
STATE_FILTER, EVENT_FILTER, collector,
http_version, 1000L, ssl, bt, true,
connect, dependency_handler, blocking_socket, ~0,
connect, dependency_handler, blocking_socket,
#endif // HAS_CAPTURE
&state)
~0, &state)
{
}

Expand Down
4 changes: 2 additions & 2 deletions userspace/libsinsp/k8s_pod_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ k8s_pod_handler::k8s_pod_handler(k8s_state_t& state
url, "/api/v1/pods?fieldSelector=status.phase%3DRunning",
STATE_FILTER, EVENT_FILTER, collector,
http_version, 1000L, ssl, bt, true,
connect, dependency_handler, blocking_socket, ~0,
connect, dependency_handler, blocking_socket,
#endif // HAS_CAPTURE
&state)
~0, &state)
{
}

Expand Down
2 changes: 1 addition & 1 deletion userspace/libsinsp/k8s_replicaset_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ k8s_replicaset_handler::k8s_replicaset_handler(k8s_state_t& state
STATE_FILTER, EVENT_FILTER, collector,
http_version, 1000L, ssl, bt, true,
connect, dependency_handler, blocking_socket,
100, // max msgs,
#endif // HAS_CAPTURE
100, // max msgs
&state)
{
}
Expand Down
2 changes: 1 addition & 1 deletion userspace/libsinsp/k8s_replicationcontroller_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ k8s_replicationcontroller_handler::k8s_replicationcontroller_handler(k8s_state_t
STATE_FILTER, EVENT_FILTER, collector,
http_version, 1000L, ssl, bt, true,
connect, dependency_handler, blocking_socket,
100, // max msgs,
#endif // HAS_CAPTURE
100, // max msgs
&state)
{
}
Expand Down
2 changes: 1 addition & 1 deletion userspace/libsinsp/k8s_service_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ k8s_service_handler::k8s_service_handler(k8s_state_t& state
STATE_FILTER, EVENT_FILTER, collector,
http_version, 1000L, ssl, bt, true,
connect, dependency_handler, blocking_socket,
100, // max msgs,
#endif // HAS_CAPTURE
100, // max msgs
&state)
{
}
Expand Down

0 comments on commit cdcb49e

Please sign in to comment.