{"id":19002318,"url":"https://github.com/linkerd/linkerd2-mock-dst","last_synced_at":"2025-10-05T08:54:49.945Z","repository":{"id":151283232,"uuid":"250382003","full_name":"linkerd/linkerd2-mock-dst","owner":"linkerd","description":"A mock version of the Linkerd 2 Destination service, for testing purposes.","archived":false,"fork":false,"pushed_at":"2020-08-17T21:28:41.000Z","size":84,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-22T18:07:35.535Z","etag":null,"topics":["linkerd"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linkerd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-03-26T22:04:55.000Z","updated_at":"2021-03-29T05:54:00.000Z","dependencies_parsed_at":"2023-05-09T12:32:09.105Z","dependency_job_id":null,"html_url":"https://github.com/linkerd/linkerd2-mock-dst","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkerd%2Flinkerd2-mock-dst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkerd%2Flinkerd2-mock-dst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkerd%2Flinkerd2-mock-dst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkerd%2Flinkerd2-mock-dst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linkerd","download_url":"https://codeload.github.com/linkerd/linkerd2-mock-dst/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250296175,"owners_count":21407037,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linkerd"],"created_at":"2024-11-08T18:14:37.879Z","updated_at":"2025-10-05T08:54:49.834Z","avatar_url":"https://github.com/linkerd.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# linkerd2-mock-dst\n\nThis repository contains a mock implementation of Linkerd 2's [Destination\nservice][dst-svc], intended for proxy testing and benchmarking. \n\nUnlike the real Destination service, which serves service discovery requests\nfrom proxies based on information in the Kubernetes API, the mock implementation\ncurrently serves a fixed set of destinations and endpoints. In the future, it\nwill also support simulating changes in cluster state for testing purposes.\n\nThe mock Destination service may be run in a standalone process as a\ncommand-line application. Additionally, it can also be used as a Rust library,\nto embed a mock Destination service in Rust tests.\n\n[dst-svc]: https://linkerd.io/2/reference/architecture/#destination\n\n## Usage\n\n```\nlinkerd2-mock-dst 0.1.0\nA mock Linkerd 2 Destination server.\n\nUSAGE:\n    linkerd2-mock-dst [OPTIONS] \u003cDSTS\u003e\n\nFLAGS:\n    -h, --help       \n            Prints help information\n\n    -V, --version    \n            Prints version information\n\n\nOPTIONS:\n    -a, --addr \u003caddr\u003e    \n            The address that the mock destination service will listen on [default: 0.0.0.0:8086]\n\n\nARGS:\n    \u003cDSTS\u003e    \n            A list of mock destinations to serve.\n            \n            This is parsed as a list of `DESTINATION=ENDPOINTS` pairs, where `DESTINATION` is a scheme, DNS name, and\n            port, and `ENDPOINTS` is a comma-separated list of socket addresses. Each pair is separated by semicolons.\n            [env: LINKERD2_MOCK_DSTS=]\n```\n\n## Examples\n\nMock destinations for the `foo.ns.svc.cluster.local` service:\n\n```console\n:; RUST_LOG=linkerd2_mock_dst=info \\\n   LINKERD2_MOCK_DSTS='http://foo.ns.svc.cluster.local:8080=127.0.0.1:1234,127.0.0.1:1235;http://bar.ns.svc.cluster.local:8081=127.0.0.1:4321' \\\n   cargo run\n```\n\nMock identity for the `foo-ns1-ca1` identity name:\n\n```console\n:; ls /path/to/identities\nfoo-ns1-ca1/\n\n:; ls /path/to/identities/foo-ns1-ca1/\ncrt.pem csr.der key.p8\n\n:; RUST_LOG=linkerd2_mock_dst=info \\\n   LINKERD2_MOCK_DST_IDENTITIES_DIR='/path/to/identities/' \\\n   cargo run\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkerd%2Flinkerd2-mock-dst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinkerd%2Flinkerd2-mock-dst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkerd%2Flinkerd2-mock-dst/lists"}