mirror of
				https://github.com/ossrs/srs.git
				synced 2025-03-09 15:49:59 +00:00 
			
		
		
		
	API: Stat the oc(origin cluster).
This commit is contained in:
		
							parent
							
								
									533e86eaf8
								
							
						
					
					
						commit
						18a155bf31
					
				
					 2 changed files with 8 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -4859,10 +4859,16 @@ string SrsConfig::get_vhost_edge_transform_vhost(string vhost)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
bool SrsConfig::get_vhost_origin_cluster(string vhost)
 | 
			
		||||
{
 | 
			
		||||
    SrsConfDirective* conf = get_vhost(vhost);
 | 
			
		||||
    return get_vhost_origin_cluster(conf);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool SrsConfig::get_vhost_origin_cluster(SrsConfDirective* vhost)
 | 
			
		||||
{
 | 
			
		||||
    static bool DEFAULT = false;
 | 
			
		||||
    
 | 
			
		||||
    SrsConfDirective* conf = get_vhost(vhost);
 | 
			
		||||
    SrsConfDirective* conf = vhost;
 | 
			
		||||
    if (!conf) {
 | 
			
		||||
        return DEFAULT;
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -713,6 +713,7 @@ public:
 | 
			
		|||
    // Whether enable the origin cluster.
 | 
			
		||||
    // @see https://github.com/ossrs/srs/wiki/v3_EN_OriginCluster
 | 
			
		||||
    virtual bool get_vhost_origin_cluster(std::string vhost);
 | 
			
		||||
    virtual bool get_vhost_origin_cluster(SrsConfDirective* conf);
 | 
			
		||||
    // Get the co-workers of origin cluster.
 | 
			
		||||
    // @see https://github.com/ossrs/srs/wiki/v3_EN_OriginCluster
 | 
			
		||||
    virtual std::vector<std::string> get_vhost_coworkers(std::string vhost);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue