server

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2017 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Copyright 2016 Wenhui Shen <www.webx.top>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Copyright 2016 Wenhui Shen <www.webx.top>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Package server Copyright 2016 Wenhui Shen <www.webx.top>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Copyright 2016 Wenhui Shen <www.webx.top>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Index

Constants

View Source
const (
	TCPTableBasicListener = iota
	TCPTableBasicConnections
	TCPTableBasicAll
	TCPTableOwnerPIDListener
	TCPTableOwnerPIDConnections
	TCPTableOwnerPIDAll
	TCPTableOwnerModuleListener
	TCPTableOwnerModuleConnections
	TCPTableOwnerModuleAll
)
View Source
const (
	UDPTableBasicListener = iota
	UDPTableOwnerPIDAll
	UDPTableOwnerModuleAll
)

Variables

View Source
var (
	AF_INET = 2
)
View Source
var ErrNotImplemented = errors.New("not implemented yet")

Functions

func Cmd

func Cmd(ctx echo.Context) error

func CmdSendBySockJS

func CmdSendBySockJS(c sockjs.Session) error

func CmdSendByWebsocket

func CmdSendByWebsocket(c *websocket.Conn, ctx echo.Context) error

func Connections added in v1.1.0

func Connections(ctx echo.Context) (err error)

func Info

func Info(ctx echo.Context) error

func NetStatTCP added in v1.1.0

func NetStatTCP() (<-chan net.ConnectionStat, error)

func NetStatUDP added in v1.1.0

func NetStatUDP() (<-chan net.ConnectionStat, error)

func ProcessInfo added in v1.1.0

func ProcessInfo(ctx echo.Context) error

func ProcessKill added in v1.1.0

func ProcessKill(ctx echo.Context) error

func Service

func Service(ctx echo.Context) error

Types

type MIB_TCPROW_OWNER_PID added in v1.1.0

type MIB_TCPROW_OWNER_PID struct {
	// contains filtered or unexported fields
}

type MIB_TCPTABLE_OWNER_PID added in v1.1.0

type MIB_TCPTABLE_OWNER_PID struct {
	// contains filtered or unexported fields
}

type MIB_UDPROW_OWNER_PID added in v1.1.0

type MIB_UDPROW_OWNER_PID struct {
	// contains filtered or unexported fields
}

type MIB_UDPTABLE_OWNER_PID added in v1.1.0

type MIB_UDPTABLE_OWNER_PID struct {
	// contains filtered or unexported fields
}

type MemoryInformation

type MemoryInformation struct {
	Virtual *mem.VirtualMemoryStat
	Swap    *mem.SwapMemoryStat
}

type State added in v1.1.0

type State int
const (
	MIB_TCP_STATE_CLOSED State = 1 + iota
	MIB_TCP_STATE_LISTEN
	MIB_TCP_STATE_SYN_SENT
	MIB_TCP_STATE_SYN_RCVD
	MIB_TCP_STATE_ESTAB
	MIB_TCP_STATE_FIN_WAIT1
	MIB_TCP_STATE_FIN_WAIT2
	MIB_TCP_STATE_CLOSE_WAIT
	MIB_TCP_STATE_CLOSING
	MIB_TCP_STATE_LAST_ACK
	MIB_TCP_STATE_TIME_WAIT
	MIB_TCP_STATE_DELETE_TCB
)

type SystemInformation

type SystemInformation struct {
	CPU        []cpu.InfoStat
	Partitions []disk.PartitionStat
	DiskUsages []*disk.UsageStat
	DiskIO     map[string]disk.IOCountersStat
	Host       *host.InfoStat
	Load       *load.AvgStat
	Memory     *MemoryInformation
	NetIO      []net.IOCountersStat
	PIDs       []int32
	Process    []*process.Process
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL