Documentation ¶
Overview ¶
aliveパッケージは、サーバーにpingを送信し監視します。 主に使う関数は、AliveMonitoring, AliveMonitoringForWindows, AliveMonitoringForOther
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AliveMonitoring ¶ added in v0.1.3
func AliveMonitoring(addr string, pingCount int) (statistics *ping.Statistics, err error)
AliveMonitoring(addr string, pingCount int) (*ping.Statistics, error) サーバーにpingを打ち、その統計情報を返すための関数です addr string -> 送信するIPアドレス ex addr="192.168.11.1", addr="www.example.com" pingCount int -> pingする回数 ex pingCount=4
> If the OS is Windows, call `AliveMonitoringForWindows`; otherwise, call `AliveMonitoringForOther` A function that is used to ping a server and return the statistics of the ping.
func AliveMonitoringForOther ¶
func AliveMonitoringForOther(addr string, pingCount int) (*ping.Statistics, error)
AliveMonitoringForOther(addr string, pingCount int) (*ping.Statistics, error) サーバーにpingを打ち、その統計情報を返すための関数です この関数は自分のosが特定できない場合に使用すます。相手のサーバーのosはなんでもいい addr string -> 送信するIPアドレス ex addr="192.168.11.1", addr="www.example.com" pingCount int -> pingする回数 ex pingCount=4
A function that checks whether the server is alive or not. A function that is used to ping a server and return the statistics of the ping.
func AliveMonitoringForWindows ¶
func AliveMonitoringForWindows(addr string, pingCount int) (*ping.Statistics, error)
AliveMonitoringForWindows(addr string, pingCount int) (*ping.Statistics, error) サーバーにpingを打ち、その統計情報を返すためのWindows用関数です この関数は自分のosがwindowsの場合に使用すます。相手のサーバーのosはなんでもいい addr string -> 送信するIPアドレス ex addr="192.168.11.1", addr="www.example.com" pingCount int -> pingする回数 ex pingCount=4
A function that checks whether the server is alive or not. A function for windows that is used to ping a server and return the statistics of the ping.