darkgrpc

package
v1.68.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const DarkstatGRpcSock = "/tmp/darkstat/grpc.sock"
View Source
const DefaultServerPort = 50051

Variables

This section is empty.

Functions

func NewBase added in v1.67.0

func NewBase(base *configs_export.Base, include_market_goods bool) *pb.Base

func NewBases added in v1.67.0

func NewBases(Bases map[cfg.BaseUniNick]*configs_export.MarketGood) map[string]*pb.MarketGood

func NewGraphQuery added in v1.67.0

func NewGraphQuery(Query *appdata.GraphPathReq) *pb.GraphPathQuery

func NewGraphTimeAnswer added in v1.67.0

func NewGraphTimeAnswer(Time *appdata.GraphPathTime) *pb.GraphPathTime

func NewInt64 added in v1.67.0

func NewInt64(value *int) *int64

func NewInt64FromDefenseMode added in v1.67.0

func NewInt64FromDefenseMode(DefenseMode *configs_export.DefenseMode) *int64

func NewMarketGood added in v1.67.0

func NewMarketGood(good *configs_export.MarketGood) *pb.MarketGood

func NewPoBCore added in v1.67.0

func NewPoBCore(base *configs_export.PoBCore) *pb.PoBCore

func NewPos added in v1.67.0

func NewPos(pos *cfg.Vector) *pb.Pos

func NewShopItem added in v1.67.0

func NewShopItem(item *configs_export.ShopItem) *pb.ShopItem

func NewTechCompat added in v1.67.0

func NewTechCompat(tech_compat *configs_export.DiscoveryTechCompat) *pb.DiscoveryTechCompat

Types

type Client added in v1.67.0

type Client struct {
	Conn *grpc.ClientConn
	pb.DarkstatClient
}

func NewClient added in v1.67.0

func NewClient(address string) *Client

type Marketable added in v1.67.0

type Marketable interface {
	Nicknamable
	GetBases() map[cfg.BaseUniNick]*configs_export.MarketGood
}

type Nicknamable added in v1.67.0

type Nicknamable interface {
	GetNickname() string
}

type Server added in v1.67.0

type Server struct {
	pb.UnimplementedDarkstatServer
	// contains filtered or unexported fields
}

server is used to implement helloworld.GreeterServer.

func NewServer added in v1.67.0

func NewServer(app_data *appdata.AppData, port int, opts ...ServerOpt) *Server

func (*Server) GetAmmos added in v1.67.0

func (s *Server) GetAmmos(_ context.Context, in *pb.GetEquipmentInput) (*pb.GetAmmoReply, error)

func (*Server) GetBases added in v1.67.0

func (s *Server) GetBases(_ context.Context, in *pb.GetBasesInput) (*pb.GetBasesReply, error)

func (*Server) GetCommodities added in v1.67.0

func (s *Server) GetCommodities(_ context.Context, in *pb.GetCommoditiesInput) (*pb.GetCommoditiesReply, error)

func (*Server) GetCounterMeasures added in v1.67.0

func (s *Server) GetCounterMeasures(_ context.Context, in *pb.GetEquipmentInput) (*pb.GetCounterMeasuresReply, error)

func (*Server) GetEngines added in v1.67.0

func (s *Server) GetEngines(_ context.Context, in *pb.GetEquipmentInput) (*pb.GetEnginesReply, error)

func (*Server) GetGraphPaths added in v1.67.0

func (s *Server) GetGraphPaths(_ context.Context, in *pb.GetGraphPathsInput) (*pb.GetGraphPathsReply, error)

func (*Server) GetHealth added in v1.67.0

func (s *Server) GetHealth(_ context.Context, in *pb.Empty) (*pb.HealthReply, error)

func (*Server) GetPoBBases added in v1.67.0

func (s *Server) GetPoBBases(_ context.Context, in *pb.GetBasesInput) (*pb.GetBasesReply, error)

func (*Server) GetPoBGoods added in v1.67.0

func (s *Server) GetPoBGoods(_ context.Context, in *pb.Empty) (*pb.GetPoBGoodsReply, error)

func (*Server) GetPoBs added in v1.67.0

func (s *Server) GetPoBs(_ context.Context, in *pb.Empty) (*pb.GetPoBsReply, error)

func (*Server) Serve added in v1.67.0

func (r *Server) Serve()

type ServerOpt added in v1.67.0

type ServerOpt func(s *Server)

func WithSockAddr added in v1.67.0

func WithSockAddr(sock string) ServerOpt

type TechCompatable added in v1.67.0

type TechCompatable interface {
	Nicknamable
	GetDiscoveryTechCompat() *configs_export.DiscoveryTechCompat
}

Directories

Path Synopsis
Package statproto is a reverse proxy.
Package statproto is a reverse proxy.

Jump to

Keyboard shortcuts

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