routeguide

package
v0.0.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryRepository

type MemoryRepository struct {
	routeguidepb.UnimplementedRouteGuideServiceServer
	// contains filtered or unexported fields
}

MemoryRepository fulfills the Repository interface

func NewMemoryRepository

func NewMemoryRepository(filePath string) (*MemoryRepository, error)

NewMemoryRepository is a factory function to generate a new repository

func (*MemoryRepository) GetFeature

GetFeature returns the feature at the given point.

func (*MemoryRepository) RecordRoute

func (*MemoryRepository) RouteChat

type Option

type Option func(*ServiceServer) error

func WithMemoryRepository

func WithMemoryRepository() Option

WithMemoryRepository applies a memory repository to the ServiceServer

func WithRepository

func WithRepository(repo Repository) Option

WithRepository applies a given repository to the ServiceServer

type Repository

type Repository interface {
	routeguidepb.RouteGuideServiceServer
}

type ServiceServer

type ServiceServer struct {
	routeguidepb.UnimplementedRouteGuideServiceServer
	// contains filtered or unexported fields
}

ServiceServer ServiceServer

func NewServiceServer

func NewServiceServer(logger log.Logger, opts ...Option) (*ServiceServer, error)

func (*ServiceServer) GetFeature

GetFeature returns the feature at the given point.

func (*ServiceServer) RecordRoute

func (*ServiceServer) RegisterGRPC

func (srv *ServiceServer) RegisterGRPC(s *grpc.Server)

func (*ServiceServer) RouteChat

Jump to

Keyboard shortcuts

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