phylum

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: 14 Imported by: 1

Documentation

Overview

Package phylum provides a simple way to interact with shiroclient.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call[K proto.Message, R proto.Message](s *Client, ctx context.Context, methodName string, req K, resp R, config ...Config) (R, error)

Call sends requests to the phlyum, and returns a response.

Types

type Client

type Client struct {
	GetLogMetadata func(context.Context) logrus.Fields
	// contains filtered or unexported fields
}

Client is a phylum client.

func New

func New(endpoint string, log *logrus.Entry) (*Client, error)

New returns a new phylum client.

func NewMock

func NewMock(phylumPath string, log *logrus.Entry) (*Client, error)

NewMock returns a mock phylum client.

func NewMockFrom

func NewMockFrom(phylumPath string, log *logrus.Entry, r io.Reader) (*Client, error)

NewMockFrom returns a mock phylum client restored from a DB snapshot.

func (*Client) Close

func (s *Client) Close() error

Close closes the client if necessary.

func (*Client) GetHealthCheck

func (s *Client) GetHealthCheck(ctx context.Context, services []string, config ...Config) (*healthcheck.GetHealthCheckResponse, error)

HealthCheck performs health check on phylum.

func (*Client) MockSnapshot

func (s *Client) MockSnapshot(w io.Writer) error

MockSnapshot copies the current state of the mock backend out to the supplied io.Writer.

type Config

type Config = shiroclient.Config

Config is an alias (not a distinct type)

Jump to

Keyboard shortcuts

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