From 5f3b1daf8278ada3f366c20a21bb6a0ae552fe84 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Mon, 19 Oct 2020 08:19:45 +0100 Subject: [PATCH] Update network.go --- network/network.go | 56 +++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/network/network.go b/network/network.go index 054d3745..c7a25a10 100644 --- a/network/network.go +++ b/network/network.go @@ -6,34 +6,6 @@ import ( "github.com/micro/go-micro/v3/server" ) -// Error is network node errors -type Error interface { - // Count is current count of errors - Count() int - // Msg is last error message - Msg() string -} - -// Status is node status -type Status interface { - // Error reports error status - Error() Error -} - -// Node is network node -type Node interface { - // Id is node id - Id() string - // Address is node bind address - Address() string - // Peers returns node peers - Peers() []Node - // Network is the network node is in - Network() Network - // Status returns node status - Status() Status -} - // Network is micro network type Network interface { // Node is network node @@ -53,3 +25,31 @@ type Network interface { // Server is micro server Server() server.Server } + +// Node is network node +type Node interface { + // Id is node id + Id() string + // Address is node bind address + Address() string + // Peers returns node peers + Peers() []Node + // Network is the network node is in + Network() Network + // Status returns node status + Status() Status +} + +// Error is network node errors +type Error interface { + // Count is current count of errors + Count() int + // Msg is last error message + Msg() string +} + +// Status is node status +type Status interface { + // Error reports error status + Error() Error +}