summaryrefslogtreecommitdiff
path: root/protocol/observe.go
diff options
context:
space:
mode:
authorKeuin <[email protected]>2024-03-09 20:19:35 +0800
committerKeuin <[email protected]>2024-03-09 20:20:20 +0800
commitb933083d20b3db4a3d6a8134efe312eb6ff3d8e2 (patch)
tree2a86151c77b1eed1596b5f50ce824659e3c1fc22 /protocol/observe.go
initial versionHEADmaster
Diffstat (limited to 'protocol/observe.go')
-rw-r--r--protocol/observe.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/protocol/observe.go b/protocol/observe.go
new file mode 100644
index 0000000..48d052a
--- /dev/null
+++ b/protocol/observe.go
@@ -0,0 +1,14 @@
+package protocol
+
+import (
+ "fmt"
+)
+
+type Target struct {
+ Host string `json:"host"`
+ Port uint16 `json:"port"`
+}
+
+func (t Target) String() string {
+ return fmt.Sprintf("%s:%d", t.Host, t.Port)
+}