Categorygithub.com/ArthurHlt/gohc
modulepackage
1.1.0
Repository: https://github.com/arthurhlt/gohc.git
Documentation: pkg.go.dev

# README

Gohc

Library for making different type of healthchecks with a common interface.

Different type are:

  • Http(s): which allow HTTP1, HTTP2 and HTTP3 healthcheck and can send data, check for multiple statuses and check for received data.
  • Tcp: which allow TCP healthcheck by trying to connect in tcp send data if set and check for received data if set.
  • GRPC: Perform grpc healthcheck defined in https://github.com/grpc/grpc/blob/master/doc/health-checking.md
  • Program: Execute a program by passing config (json format) in stdin and check for exit code.
  • ICMP (a.k.a ping): Perform icmp healthcheck by sending icmp echo request and check for icmp echo reply.
  • UDP: there is two methods for udp healthcheck:
    • Send data and check for received data.
    • A weaker method which ping the server first and then send data over udp and wait until timeout to ensure to not receive Port Unreachable ICMP error. This method require root privileges to capture this ICMP reply.
  • Chains: Allow to chain multiple healthchecks and execute them in parallel or in sequence with or without requiring all checks passing.

Note: Types http, Tcp, GRPC and Program allow tls support. You can, for example, do tcp+tls test.

Usage

Go to examples folder to see how to use it.

# Packages

No description provided by the author
No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
[#not-implemented-hide:] QUIC implementation is not production ready yet.
No description provided by the author

# Variables

Enum value maps for CodecClientType.
Enum value maps for CodecClientType.

# Structs

No description provided by the author
No description provided by the author
GrpcOpt Describes the gRPC health check specific options.
No description provided by the author
HttpOpt Describes the health check policy for a given endpoint.
No description provided by the author
No description provided by the author
IntRange Specifies the int64 start and end of the range using half-open interval semantics [start, end).
No description provided by the author
Payload Describes the encoding of the payload bytes in the payload.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TcpOpt Describes the TCP health check specific options.
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author