Documentation
¶
Overview ¶
Package networkprobe checks an operator-enrolled node through its public ingress.
Index ¶
- Constants
- func AuthorityOrigin(raw string) (string, error)
- func Check(ctx context.Context, client *http.Client, work Work, ...) error
- func Client() *http.Client
- func Fetch(ctx context.Context, client *http.Client, address string, limit int64) ([]byte, error)
- func LoadRelease(path string) (*networkconfig.Config, error)
- func ReleaseClient() *http.Client
- func ResolveAuthority(config *networkconfig.Config, override string) (string, error)
- type AuthorityError
- type Observation
- type SyntheticShare
- type Target
- type Work
Constants ¶
const OriginCount = 3
Variables ¶
This section is empty.
Functions ¶
func AuthorityOrigin ¶
AuthorityOrigin validates and canonicalizes an authority HTTPS origin so operator overrides cannot transmit credentials over plaintext HTTP or inject paths, queries, or fragments.
func Check ¶
func Check(ctx context.Context, client *http.Client, work Work, shares [OriginCount]SyntheticShare) error
func LoadRelease ¶
func LoadRelease(path string) (*networkconfig.Config, error)
LoadRelease returns the compiled-in release configuration when path is empty, or reads and verifies an explicit release manifest file for operator tools.
func ReleaseClient ¶
ReleaseClient follows the host's DNS policy for release-configured authority URLs.
func ResolveAuthority ¶
func ResolveAuthority(config *networkconfig.Config, override string) (string, error)
ResolveAuthority selects an explicit authority override when provided, or falls back to the release manifest's authority URL.
Types ¶
type AuthorityError ¶
AuthorityError records a non-200 HTTP response from the network authority, including any validated fault kind and reason parsed from its JSON body.
func ReadAuthorityError ¶
func ReadAuthorityError(action string, res *http.Response) *AuthorityError
ReadAuthorityError builds a structured diagnostic error from a non-200 authority HTTP response. Non-JSON, oversized, or non-token payloads fall back to the bare HTTP status so intermediary pages cannot pollute logs.
func (*AuthorityError) Error ¶
func (e *AuthorityError) Error() string
type Observation ¶
type SyntheticShare ¶
type SyntheticShare struct {
// contains filtered or unexported fields
}
func NewShare ¶
func NewShare() (SyntheticShare, error)
func (SyntheticShare) ID ¶
func (s SyntheticShare) ID() [link.SenderAuthenticatedShareIDBytes]byte
type Target ¶
type Target struct {
OperationID string `json:"operation_id"`
Node nodedirectory.Node `json:"spec"`
}