rpc

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2024 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Overview

Package shiroclient provides the ShiroClient interface and one implementations - a mode that connects to a JSON-RPC/HTTP gateway.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTimeoutError

func IsTimeoutError(err error) bool

IsTimeoutError inspects an error returned from shiroclient and returns true if it's a timeout.

func NewRPC

func NewRPC(clientConfigs []types.Config) types.ShiroClient

NewRPC creates a new RPC ShiroClient with the given set of base configs that will be applied to all commands.

Types

type HealthCheck

type HealthCheck interface {
	Reports() []HealthCheckReport
}

func RemoteHealthCheck

func RemoteHealthCheck(ctx context.Context, client types.ShiroClient, services []string, configs ...types.Config) (HealthCheck, error)

type HealthCheckReport

type HealthCheckReport interface {
	// Timestamp of when the report was generated (RFC3339).
	Timestamp() string
	// Status of the service.
	Status() string
	// Name of the service.
	ServiceName() string
	// Version of the service.
	ServiceVersion() string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL