{"id":3571664,"name":"github.com/sourcegraph/rpc","ecosystem":"go","description":"Package rpc is a fork of the stdlib net/rpc which is frozen. It adds\nsupport for context.Context on the client and server, including\npropogating cancellation. See the README at\nhttps://github.com/keegancsmith/rpc for motivation why this exists.\n\nThe API is exactly the same, except Client.Call takes a context.Context,\nand Server methods are expected to take a context.Context as the first\nargument. The following is the original rpc godoc updated to include\ncontext.Context.\n\nPackage rpc provides access to the exported methods of an object across a\nnetwork or other I/O connection.  A server registers an object, making it visible\nas a service with the name of the type of the object.  After registration, exported\nmethods of the object will be accessible remotely.  A server may register multiple\nobjects (services) of different types but it is an error to register multiple\nobjects of the same type.\n\nOnly methods that satisfy these criteria will be made available for remote access;\nother methods will be ignored:\n\nIn effect, the method must look schematically like\n\nwhere T1 and T2 can be marshaled by encoding/gob.\nThese requirements apply even if a different codec is used.\n(In the future, these requirements may soften for custom codecs.)\n\nThe method's second argument represents the arguments provided by the caller; the\nthird argument represents the result parameters to be returned to the caller.\nThe method's return value, if non-nil, is passed back as a string that the client\nsees as if created by errors.New.  If an error is returned, the reply parameter\nwill not be sent back to the client.\n\nThe server may handle requests on a single connection by calling ServeConn.  More\ntypically it will create a network listener and call Accept or, for an HTTP\nlistener, HandleHTTP and http.Serve.\n\nA client wishing to use the service establishes a connection and then invokes\nNewClient on the connection.  The convenience function Dial (DialHTTP) performs\nboth steps for a raw network connection (an HTTP connection).  The resulting\nClient object has two methods, Call and Go, that specify the service and method to\ncall, a pointer containing the arguments, and a pointer to receive the result\nparameters.\n\nThe Call method waits for the remote call to complete while the Go method\nlaunches the call asynchronously and signals completion using the Call\nstructure's Done channel.\n\nUnless an explicit codec is set up, package encoding/gob is used to\ntransport the data.\n\nHere is a simple example.  A server wishes to export an object of type Arith:\n\nThe server calls (for HTTP service):\n\nAt this point, clients can see a service \"Arith\" with methods \"Arith.Multiply\" and\n\"Arith.Divide\".  To invoke one, a client first dials the server:\n\nThen it can make a remote call:\n\nor\n\nA server implementation will often provide a simple, type-safe wrapper for the\nclient.\n\nThe net/rpc package is frozen and is not accepting new features.","homepage":"https://github.com/sourcegraph/rpc","licenses":"BSD-3-Clause","normalized_licenses":["BSD-3-Clause"],"repository_url":"https://github.com/sourcegraph/rpc","keywords_array":[],"namespace":"github.com/sourcegraph","versions_count":2,"first_release_published_at":"2018-01-25T20:58:57.000Z","latest_release_published_at":"2018-01-29T16:40:18.000Z","latest_release_number":"v1.0.1","last_synced_at":"2026-03-05T23:19:20.249Z","created_at":"2022-04-11T03:07:28.741Z","updated_at":"2026-03-05T23:19:20.250Z","registry_url":"https://pkg.go.dev/github.com/sourcegraph/rpc","install_command":"go get github.com/sourcegraph/rpc","documentation_url":"https://pkg.go.dev/github.com/sourcegraph/rpc#section-documentation","metadata":{},"repo_metadata":{"uuid":"127343482","full_name":"sourcegraph/rpc","owner":"sourcegraph","description":"Go stdlib net/rpc with context.Context support","archived":false,"fork":true,"pushed_at":"2018-03-29T20:38:12.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2023-03-16T03:01:34.385Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"keegancsmith/rpc","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"logo_url":null,"metadata":{},"created_at":"2018-03-29T20:22:37.000Z","updated_at":"2018-12-20T15:33:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sourcegraph/rpc","commit_stats":null,"repository_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcegraph%2Frpc","tags_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcegraph%2Frpc/tags","manifests_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcegraph%2Frpc/manifests","owner_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sourcegraph","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":108921946,"host_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names"}},"repo_metadata_updated_at":"2023-03-21T18:47:10.852Z","dependent_packages_count":0,"downloads":null,"downloads_period":null,"dependent_repos_count":0,"rankings":{"downloads":null,"dependent_repos_count":9.345852080216646,"dependent_packages_count":6.999148183520997,"stargazers_count":null,"forks_count":null,"average":8.172500131868823},"purl":"pkg:golang/github.com/sourcegraph/rpc","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/go/github.com/sourcegraph/rpc","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/go/github.com/sourcegraph/rpc","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/go/github.com/sourcegraph/rpc/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":{"last_synced_at":"2023-08-12T01:04:36.623Z","issues_count":0,"pull_requests_count":0,"avg_time_to_close_issue":null,"avg_time_to_close_pull_request":null,"issues_closed_count":0,"pull_requests_closed_count":0,"pull_request_authors_count":0,"issue_authors_count":0,"avg_comments_per_issue":null,"avg_comments_per_pull_request":null,"merged_pull_requests_count":0,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fsourcegraph%2Frpc/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fsourcegraph%2Frpc/version_numbers","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fsourcegraph%2Frpc/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fsourcegraph%2Frpc/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fsourcegraph%2Frpc/codemeta","maintainers":[]}