INNER CODE UNIT · Go

ServerOptions

chaitin/SafeLine · management/webserver/rpc/main.go:36

func ServerOptions() ([]grpc.ServerOption, error) {
	opts := []grpc.ServerOption{
		grpc.StreamInterceptor(subscribeAuthInterceptor),
	}

	creds, err := ServerCreds()
	if err != nil {
		return nil, err
	}
	opts = append(opts, creds)
	return opts, nil
}

func StartGRPCSever() error {
	lis, err := net.Listen("tcp", config.GlobalConfig.GPRC.ListenAddr)
	if err != nil {
		return errors.Wrap(err, "Failed to listen")
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…