Documentation ¶
Index ¶
- type AtomicSlice
- func (s *AtomicSlice[PT, T]) Copy() *AtomicSlice[PT, T]
- func (s *AtomicSlice[PT, T]) Equal(t *AtomicSlice[PT, T]) bool
- func (s *AtomicSlice[PT, T]) Get(target PT) (PT, bool)
- func (s *AtomicSlice[PT, T]) Insert(target PT) PT
- func (s *AtomicSlice[PT, T]) Load() []PT
- func (s *AtomicSlice[PT, T]) MarshalJSON() ([]byte, error)
- func (s *AtomicSlice[PT, T]) Store(v []PT)
- func (s *AtomicSlice[PT, T]) UnmarshalJSON(b []byte) error
- type AtomicUint
- type DB
- type LastStatus
- func (v *LastStatus) Copy() *LastStatus
- func (v *LastStatus) CopyAsInterface() interface{}
- func (l *LastStatus) DidAttempt()
- func (l *LastStatus) DidSucceed()
- func (v *LastStatus) Equal(u *LastStatus) bool
- func (l *LastStatus) SinceAttempt() time.Duration
- func (l *LastStatus) SinceSuccess() time.Duration
- func (s *LastStatus) UnmarshalJSON(b []byte) error
- type PeerAddressStatus
- func (s *PeerAddressStatus) Compare(b *PeerAddressStatus) int
- func (v *PeerAddressStatus) Copy() *PeerAddressStatus
- func (v *PeerAddressStatus) CopyAsInterface() interface{}
- func (v *PeerAddressStatus) Equal(u *PeerAddressStatus) bool
- func (v *PeerAddressStatus) MarshalJSON() ([]byte, error)
- func (v *PeerAddressStatus) UnmarshalJSON(data []byte) error
- type PeerNetworkStatus
- func (s *PeerNetworkStatus) Compare(b *PeerNetworkStatus) int
- func (v *PeerNetworkStatus) Copy() *PeerNetworkStatus
- func (v *PeerNetworkStatus) CopyAsInterface() interface{}
- func (v *PeerNetworkStatus) Equal(u *PeerNetworkStatus) bool
- func (p *PeerNetworkStatus) Service(addr *api.ServiceAddress) *PeerServiceStatus
- func (s *PeerNetworkStatus) UnmarshalJSON(b []byte) error
- type PeerServiceStatus
- type PeerStatus
- func (p *PeerStatus) Address(addr multiaddr.Multiaddr) *PeerAddressStatus
- func (s *PeerStatus) Compare(q *PeerStatus) int
- func (v *PeerStatus) Copy() *PeerStatus
- func (v *PeerStatus) CopyAsInterface() interface{}
- func (v *PeerStatus) Equal(u *PeerStatus) bool
- func (p *PeerStatus) Network(name string) *PeerNetworkStatus
- func (s *PeerStatus) UnmarshalJSON(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtomicSlice ¶
func (*AtomicSlice[PT, T]) Copy ¶
func (s *AtomicSlice[PT, T]) Copy() *AtomicSlice[PT, T]
func (*AtomicSlice[PT, T]) Equal ¶
func (s *AtomicSlice[PT, T]) Equal(t *AtomicSlice[PT, T]) bool
func (*AtomicSlice[PT, T]) Get ¶
func (s *AtomicSlice[PT, T]) Get(target PT) (PT, bool)
func (*AtomicSlice[PT, T]) Insert ¶
func (s *AtomicSlice[PT, T]) Insert(target PT) PT
func (*AtomicSlice[PT, T]) Load ¶
func (s *AtomicSlice[PT, T]) Load() []PT
func (*AtomicSlice[PT, T]) MarshalJSON ¶
func (s *AtomicSlice[PT, T]) MarshalJSON() ([]byte, error)
func (*AtomicSlice[PT, T]) Store ¶
func (s *AtomicSlice[PT, T]) Store(v []PT)
func (*AtomicSlice[PT, T]) UnmarshalJSON ¶
func (s *AtomicSlice[PT, T]) UnmarshalJSON(b []byte) error
type AtomicUint ¶
func (*AtomicUint) Add ¶
func (v *AtomicUint) Add(delta uint64)
func (*AtomicUint) Copy ¶
func (v *AtomicUint) Copy() *AtomicUint
func (*AtomicUint) Equal ¶
func (v *AtomicUint) Equal(u *AtomicUint) bool
func (*AtomicUint) Load ¶
func (v *AtomicUint) Load() uint64
func (*AtomicUint) MarshalJSON ¶
func (v *AtomicUint) MarshalJSON() ([]byte, error)
func (*AtomicUint) Store ¶
func (v *AtomicUint) Store(u uint64)
func (*AtomicUint) UnmarshalJSON ¶
func (v *AtomicUint) UnmarshalJSON(b []byte) error
type DB ¶
type DB struct { LastScan *time.Time `json:"lastScan,omitempty" form:"lastScan" query:"lastScan" validate:"required"` Peers *AtomicSlice[*PeerStatus, PeerStatus] `json:"peers,omitempty" form:"peers" query:"peers" validate:"required"` }
func (*DB) CopyAsInterface ¶
func (v *DB) CopyAsInterface() interface{}
type LastStatus ¶
type LastStatus struct { Success *time.Time `json:"success,omitempty" form:"success" query:"success" validate:"required"` Attempt *time.Time `json:"attempt,omitempty" form:"attempt" query:"attempt" validate:"required"` Failed *AtomicUint `json:"failed,omitempty" form:"failed" query:"failed" validate:"required"` }
func (*LastStatus) Copy ¶
func (v *LastStatus) Copy() *LastStatus
func (*LastStatus) CopyAsInterface ¶
func (v *LastStatus) CopyAsInterface() interface{}
func (*LastStatus) DidAttempt ¶
func (l *LastStatus) DidAttempt()
func (*LastStatus) DidSucceed ¶
func (l *LastStatus) DidSucceed()
func (*LastStatus) Equal ¶
func (v *LastStatus) Equal(u *LastStatus) bool
func (*LastStatus) SinceAttempt ¶
func (l *LastStatus) SinceAttempt() time.Duration
func (*LastStatus) SinceSuccess ¶
func (l *LastStatus) SinceSuccess() time.Duration
func (*LastStatus) UnmarshalJSON ¶
func (s *LastStatus) UnmarshalJSON(b []byte) error
type PeerAddressStatus ¶
type PeerAddressStatus struct { Address p2p.Multiaddr `json:"address,omitempty" form:"address" query:"address" validate:"required"` Last LastStatus `json:"last,omitempty" form:"last" query:"last" validate:"required"` }
func (*PeerAddressStatus) Compare ¶
func (s *PeerAddressStatus) Compare(b *PeerAddressStatus) int
func (*PeerAddressStatus) Copy ¶
func (v *PeerAddressStatus) Copy() *PeerAddressStatus
func (*PeerAddressStatus) CopyAsInterface ¶
func (v *PeerAddressStatus) CopyAsInterface() interface{}
func (*PeerAddressStatus) Equal ¶
func (v *PeerAddressStatus) Equal(u *PeerAddressStatus) bool
func (*PeerAddressStatus) MarshalJSON ¶
func (v *PeerAddressStatus) MarshalJSON() ([]byte, error)
func (*PeerAddressStatus) UnmarshalJSON ¶
func (v *PeerAddressStatus) UnmarshalJSON(data []byte) error
type PeerNetworkStatus ¶
type PeerNetworkStatus struct { Name string `json:"name,omitempty" form:"name" query:"name" validate:"required"` Services *AtomicSlice[*PeerServiceStatus, PeerServiceStatus] `json:"services,omitempty" form:"services" query:"services" validate:"required"` }
func (*PeerNetworkStatus) Compare ¶
func (s *PeerNetworkStatus) Compare(b *PeerNetworkStatus) int
func (*PeerNetworkStatus) Copy ¶
func (v *PeerNetworkStatus) Copy() *PeerNetworkStatus
func (*PeerNetworkStatus) CopyAsInterface ¶
func (v *PeerNetworkStatus) CopyAsInterface() interface{}
func (*PeerNetworkStatus) Equal ¶
func (v *PeerNetworkStatus) Equal(u *PeerNetworkStatus) bool
func (*PeerNetworkStatus) Service ¶
func (p *PeerNetworkStatus) Service(addr *api.ServiceAddress) *PeerServiceStatus
func (*PeerNetworkStatus) UnmarshalJSON ¶
func (s *PeerNetworkStatus) UnmarshalJSON(b []byte) error
type PeerServiceStatus ¶
type PeerServiceStatus struct { Address *api.ServiceAddress `json:"address,omitempty" form:"address" query:"address" validate:"required"` Last LastStatus `json:"last,omitempty" form:"last" query:"last" validate:"required"` }
func (*PeerServiceStatus) Compare ¶
func (s *PeerServiceStatus) Compare(q *PeerServiceStatus) int
func (*PeerServiceStatus) Copy ¶
func (v *PeerServiceStatus) Copy() *PeerServiceStatus
func (*PeerServiceStatus) CopyAsInterface ¶
func (v *PeerServiceStatus) CopyAsInterface() interface{}
func (*PeerServiceStatus) Equal ¶
func (v *PeerServiceStatus) Equal(u *PeerServiceStatus) bool
type PeerStatus ¶
type PeerStatus struct { ID p2p.PeerID Addresses *AtomicSlice[*PeerAddressStatus, PeerAddressStatus] `json:"addresses,omitempty" form:"addresses" query:"addresses" validate:"required"` Networks *AtomicSlice[*PeerNetworkStatus, PeerNetworkStatus] `json:"networks,omitempty" form:"networks" query:"networks" validate:"required"` }
func (*PeerStatus) Address ¶
func (p *PeerStatus) Address(addr multiaddr.Multiaddr) *PeerAddressStatus
func (*PeerStatus) Compare ¶
func (s *PeerStatus) Compare(q *PeerStatus) int
func (*PeerStatus) Copy ¶
func (v *PeerStatus) Copy() *PeerStatus
func (*PeerStatus) CopyAsInterface ¶
func (v *PeerStatus) CopyAsInterface() interface{}
func (*PeerStatus) Equal ¶
func (v *PeerStatus) Equal(u *PeerStatus) bool
func (*PeerStatus) Network ¶
func (p *PeerStatus) Network(name string) *PeerNetworkStatus
func (*PeerStatus) UnmarshalJSON ¶
func (s *PeerStatus) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.