# README
Service
TODO: https://go-zero.dev/docs/advance/rpc-call
Usage
type Config struct {
service.ServerConfiguration
Mysql struct {
DataSource string
}
CacheRedis cache.CacheConf
}
Name: user.rpc
ListenOn: 127.0.0.1:8080
Etcd:
Hosts:
- $etcdHost
Key: user.rpc
Mysql:
DataSource: $user:$password@tcp($url)/$db?charset=utf8mb4&parseTime=true&loc=Asia%2FShanghai
CacheRedis:
- Host: $host
Pass: $pass
Type: node
# Functions
ClientName Name of the client.
Context appContext to trigger terminate signal.
NewClient creates and returns a new grpc client connection Users should call ClientConn.Close() to terminate all the pending operations.
NewServer creates and returns a new grpc Server.
ServerName Name of the service.
SetServingStatus updates service health status.
Start all daemon services and wait for kill signal, then gracefully shutdown.
WithDialOptions DialOptions for client.
WithListener specifies the net.Listener to use instead of the default.
WithServerOptions ServerOptions for server.
# Constants
DefaultAddress random port.
DefaultMaxRecvMsgSize maximum message that client can receive (16 MB).
DefaultMaxSendMsgSize maximum message that client can send (16 MB).
DefaultName default server name.
# Variables
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
Server is a grpc Server.