byteconf-knowledge

Integrate ByteConf SDK in Go services for dynamic configuration delivery and real-time updates.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/yuezhen-huang/my-bytedance-skillhub --skill byteconf-knowledge-yuezhen-huang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: byteconf-knowledge
Source: https://github.com/yuezhen-huang/my-bytedance-skillhub/tree/main/byteconf-knowledge
Command: npx skills add https://github.com/yuezhen-huang/my-bytedance-skillhub --skill byteconf-knowledge-yuezhen-huang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires code.byted.org/ttarch/byteconf_sdk, and includes references (resource) components.

What problem does it solve? Go services often need configuration that changes without redeployment. This Skill teaches how to integrate the ByteConf configuration management platform via the code.byted.org/ttarch/byteconf_sdk library, enabling dynamic config delivery, real-time updates, and conditional rule management. ## Core Features & Use Cases - Single and Multi-Key Listening: Create clients with NewClient or NewClientByKeys to watch individual configuration keys with change callbacks. - Directory Listening: Use NewClientByPath to recursively watch all configs under a path with prefix matching, receiving add/update/delete events. - One-Time Fetch for FaaS: Use GetConfByOnce and GetPathByOnce to pull configs once without maintaining long-lived gRPC connections. - Use Case: A service needs a feature flag and scoring parameters that update in seconds. Initialize a ByteConf client at startup, register a key callback, and read deserialized config models from memory on each change. ## Quick Start Show me how to initialize a ByteConf client in Go to listen to the config key /dmt/douyin/score and handle updates with a callback.

Frequently Asked Questions about byteconf-knowledge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I listen to ByteConf config changes in Go?

Create a client with byteconf.NewClient or NewClientByKeys, passing a callback via WithClientKeyCallback. The SDK maintains a gRPC long connection and invokes your callback whenever the config changes, with updates taking effect in seconds.

How to fetch ByteConf config once without listening?

Use byteconf.GetConfByOnce for a single key's raw bytes, GetConfModelByOnce for a deserialized model, or GetPathByOnce for all configs under a directory. These suit FaaS scenarios that only need config at startup.

What is the difference between NewClient, NewClientByKeys, and NewClientByPath?

NewClient watches a single config key, NewClientByKeys watches multiple keys, and NewClientByPath recursively watches all configs under a directory with prefix matching. Duplicate listening on the same key is not allowed.

Why does ByteConf SDK deadlock when calling NewClient in a callback?

Creating a new client inside a callback causes a deadlock because the SDK's internal listener lock is held during callback execution. Initialize all clients at program startup instead, and panic if NewClient returns an error.

Does ByteConf SDK work on a Mac for local development?

Yes, but you must set the environment variable RUNTIME_IDC_NAME=boe on a Mac so the SDK connects to the BOE environment. Without it, config retrieval will fail in local development.

How do I check why ByteConf NewClient failed?

Cast the returned error to byteconf.NewClientError and call IsNotExist to detect a missing config key. Other error types indicate different failures, which should typically cause the program to panic at startup.