fakeserver

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Name is the name of the compiled software.
	Name = "onex-fakeserver"

	// ID contains the host name and any error encountered during the retrieval.
	ID, _ = os.Hostname()
)

Functions

This section is empty.

Types

type Config

type Config struct {
	FakeStore     bool
	GRPCOptions   *genericoptions.GRPCOptions
	HTTPOptions   *genericoptions.HTTPOptions
	TLSOptions    *genericoptions.TLSOptions
	MySQLOptions  *genericoptions.MySQLOptions
	JaegerOptions *genericoptions.JaegerOptions
}

Config represents the configuration of the service.

func (*Config) Complete

func (cfg *Config) Complete() completedConfig

Complete fills in any fields not set that are required to have valid data. It's mutating the receiver.

type FakeServer

type FakeServer struct {
	// contains filtered or unexported fields
}

FakeServer represents the fake server.

func (*FakeServer) Run

func (s *FakeServer) Run(stopCh <-chan struct{}) error

type GRPCServer

type GRPCServer struct {
	// contains filtered or unexported fields
}

func NewGRPCServer

func NewGRPCServer(
	grpcOptions *genericoptions.GRPCOptions,
	tlsOptions *genericoptions.TLSOptions,
	srv pb.FakeServerServer,
) (*GRPCServer, error)

func (*GRPCServer) GracefulStop

func (s *GRPCServer) GracefulStop()

func (*GRPCServer) RunOrDie

func (s *GRPCServer) RunOrDie()

type HTTPServer

type HTTPServer struct {
	// contains filtered or unexported fields
}

func NewHTTPServer

func NewHTTPServer(
	httpOptions *genericoptions.HTTPOptions,
	tlsOptions *genericoptions.TLSOptions,
	grpcOptions *genericoptions.GRPCOptions,
) (*HTTPServer, error)

func (*HTTPServer) GracefulStop

func (s *HTTPServer) GracefulStop()

func (*HTTPServer) RunOrDie

func (s *HTTPServer) RunOrDie()

type Server

type Server interface {
	RunOrDie()
	GracefulStop()
}

Directories

Path Synopsis
biz
Package biz is the place where you can implements more complex business logic.
Package biz is the place where you can implements more complex business logic.
order
Package order is a generated GoMock package.
Package order is a generated GoMock package.
Package store defines the storage interface for fakeserver.
Package store defines the storage interface for fakeserver.

Jump to

Keyboard shortcuts

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