github.com/goplus/igop@v0.25.0/pkg/net/rpc/go118_export.go (about)

     1  // export by github.com/goplus/igop/cmd/qexp
     2  
     3  //go:build go1.18 && !go1.19
     4  // +build go1.18,!go1.19
     5  
     6  package rpc
     7  
     8  import (
     9  	q "net/rpc"
    10  
    11  	"go/constant"
    12  	"reflect"
    13  
    14  	"github.com/goplus/igop"
    15  )
    16  
    17  func init() {
    18  	igop.RegisterPackage(&igop.Package{
    19  		Name: "rpc",
    20  		Path: "net/rpc",
    21  		Deps: map[string]string{
    22  			"bufio":         "bufio",
    23  			"encoding/gob":  "gob",
    24  			"errors":        "errors",
    25  			"fmt":           "fmt",
    26  			"go/token":      "token",
    27  			"html/template": "template",
    28  			"io":            "io",
    29  			"log":           "log",
    30  			"net":           "net",
    31  			"net/http":      "http",
    32  			"reflect":       "reflect",
    33  			"sort":          "sort",
    34  			"strings":       "strings",
    35  			"sync":          "sync",
    36  		},
    37  		Interfaces: map[string]reflect.Type{
    38  			"ClientCodec": reflect.TypeOf((*q.ClientCodec)(nil)).Elem(),
    39  			"ServerCodec": reflect.TypeOf((*q.ServerCodec)(nil)).Elem(),
    40  		},
    41  		NamedTypes: map[string]reflect.Type{
    42  			"Call":        reflect.TypeOf((*q.Call)(nil)).Elem(),
    43  			"Client":      reflect.TypeOf((*q.Client)(nil)).Elem(),
    44  			"Request":     reflect.TypeOf((*q.Request)(nil)).Elem(),
    45  			"Response":    reflect.TypeOf((*q.Response)(nil)).Elem(),
    46  			"Server":      reflect.TypeOf((*q.Server)(nil)).Elem(),
    47  			"ServerError": reflect.TypeOf((*q.ServerError)(nil)).Elem(),
    48  		},
    49  		AliasTypes: map[string]reflect.Type{},
    50  		Vars: map[string]reflect.Value{
    51  			"DefaultServer": reflect.ValueOf(&q.DefaultServer),
    52  			"ErrShutdown":   reflect.ValueOf(&q.ErrShutdown),
    53  		},
    54  		Funcs: map[string]reflect.Value{
    55  			"Accept":             reflect.ValueOf(q.Accept),
    56  			"Dial":               reflect.ValueOf(q.Dial),
    57  			"DialHTTP":           reflect.ValueOf(q.DialHTTP),
    58  			"DialHTTPPath":       reflect.ValueOf(q.DialHTTPPath),
    59  			"HandleHTTP":         reflect.ValueOf(q.HandleHTTP),
    60  			"NewClient":          reflect.ValueOf(q.NewClient),
    61  			"NewClientWithCodec": reflect.ValueOf(q.NewClientWithCodec),
    62  			"NewServer":          reflect.ValueOf(q.NewServer),
    63  			"Register":           reflect.ValueOf(q.Register),
    64  			"RegisterName":       reflect.ValueOf(q.RegisterName),
    65  			"ServeCodec":         reflect.ValueOf(q.ServeCodec),
    66  			"ServeConn":          reflect.ValueOf(q.ServeConn),
    67  			"ServeRequest":       reflect.ValueOf(q.ServeRequest),
    68  		},
    69  		TypedConsts: map[string]igop.TypedConst{},
    70  		UntypedConsts: map[string]igop.UntypedConst{
    71  			"DefaultDebugPath": {"untyped string", constant.MakeString(string(q.DefaultDebugPath))},
    72  			"DefaultRPCPath":   {"untyped string", constant.MakeString(string(q.DefaultRPCPath))},
    73  		},
    74  	})
    75  }